[Seaside] [ANN] Seaside 3.1 and 3.0.10 release

Sebastian Sastre sebastian at flowingconcept.com
Thu Jan 2 01:24:30 UTC 2014

On Jan 1, 2014, at 11:32 AM, Johan Brichau <johan at inceptive.be> wrote:

> Any specific reason you do not want to switch to the Zinc adapter?


Only one if I recall correctly.

airflowing has an uploader with progress indicator that is tightly coupled with Comanche.

As far as I remember.. I've tried Zinc and it's all good except for that and unfortunately that's a deal-breaker for me.



PD: The critical part is in having in the http server the same object receiving the chunks of bytes in a way that can trigger over and over some kind of onUploadProgress: event with the current size in the temp file and knowing the original request. If you tell me I can do the same with Zinc, I might take a look somewhen :D

I've patched comanche to these as foundation of that idea:

WAComancheRequestConverter>>processMultipartFields: aKomRequest
	| fields |

	fields := WARequestFields new.	

	aKomRequest multipartFormFieldsDo: [ :chunk |
		| key value |
		key := chunk fieldName.
		value := chunk fileName isEmptyOrNil
			ifTrue: [
				String streamContents: [ :stream |
					chunk saveToStream: stream ] ]
			ifFalse: [self convertMultipartFileField: chunk for: aKomRequest].
		fields at: key put: value ].
	aKomRequest propertyAt: #postFields put: fields

WAComancheRequestConverter>>convertMultipartFileField: aChunk for: aKomRequest
	"Creates a temporary file, announces it 
	and begins the upload."

	| temporaryFile |	

	temporaryFile := self fileClass fromChunk: aChunk for: aKomRequest.
	temporaryFile fileName: (self codec url decode: aChunk fileName).
	self triggerEvent: #aboutToUpload: with: temporaryFile.
	temporaryFile startUploadOn: aChunk.
	^ temporaryFile 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20140101/972201ee/attachment-0001.htm

More information about the seaside mailing list