Skip to content

Commit

Permalink
Fix: incorrect server configuration for streaming uploads
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrichau committed Jan 2, 2024
1 parent bce2e80 commit 6003bc7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ configureServerForBinaryReading
"Seaside wants to do its own text conversions"

server reader: (server streamUploads
ifTrue: [ [ :stream | ZnRequest readBinaryFrom: stream ] ]
ifFalse: [ [ :stream | ZnRequest readStreamingFrom: stream ] ])
ifTrue: [ [ :stream | ZnRequest readStreamingFrom: stream ] ]
ifFalse: [ [ :stream | ZnRequest readBinaryFrom: stream ] ])
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@ requestFieldsFor: aZincRequest
fields := WARequestFields new.
(aZincRequest method = #POST and: [ aZincRequest hasEntity ])
ifTrue: [
(aZincRequest entity contentType matches:
ZnMimeType applicationFormUrlEncoded) ifTrue: [
(aZincRequest entity contentType matches: ZnMimeType applicationFormUrlEncoded) ifTrue: [
fields addAll: (aZincRequest entity class = ZnStreamingEntity
ifTrue: [
ZnApplicationFormUrlEncodedEntity new
readFrom: aZincRequest entity stream;
fields ]
ifFalse: [ aZincRequest entity fields ]) ].
(aZincRequest entity contentType matches:
ZnMimeType multiPartFormData) ifTrue: [
(aZincRequest entity contentType matches: ZnMimeType multiPartFormData) ifTrue: [
fields addAll: (self convertMultipart: aZincRequest entity) ] ].
^ fields

0 comments on commit 6003bc7

Please sign in to comment.