Skip to content

Commit

Permalink
Removed GRPharoPlatform>>newTemporaryFileReference and replaced it wi…
Browse files Browse the repository at this point in the history
…th ZnStreamingMultiPartFormDataEntity class>>temporaryFileDirectory.

I needed the directory to be configurable, so for now it's held by a class variable on ZnStreamingMultiPartFormDataEntity and can be changed.
  • Loading branch information
theseion committed May 27, 2020
1 parent 486b5e4 commit 8298623
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 13 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
as yet unclassified
temporaryFileDirectory: aFileReference
TemporaryFileDirectory := aFileReference
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
as yet unclassified
temporaryFileDirectory
^ TemporaryFileDirectory ifNil: [
TemporaryFileDirectory := FileLocator temp asFileReference ]
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ private
parseMultiPartFileFieldWithMimePart: aMimePart boundary: aBoundary decodeWith: aBlock
| fullBoundary file |
fullBoundary := String crlf asByteArray, aBoundary.
file := GRPlatform current newTemporaryFileReference.
file := self class temporaryFileDirectory / UUID new asString.
GRPlatform current
binaryWriteStreamFor: file
do: [ :writer |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"category" : "Zinc-Seaside-Pharo-Core",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"classvars" : [
"TemporaryFileDirectory"
],
"instvars" : [
"stream"
],
Expand Down

0 comments on commit 8298623

Please sign in to comment.