[Seaside] WAStreamingResponse or WAComboResponse for a single callback?

Petr Fischer petr.fischer at me.com
Fri Jan 6 00:48:58 UTC 2017


Some blog post about large uploads:
http://jbrichau.github.io/blog/large-file-upload-in-seaside

pf


> Hi Seasiders,
> 
> I have a callback that downloads a file which works perfectly until the file size becomes to large and it runs out of memory.
> 
> My response method looks like this:
> 
> response
>     attachmentWithFileName: target name;
>     contentType: target mimeType;
>     binary;
>     doNotCache.
>   target
>     readOnlyFileDo: [ :file | 
>       [ file atEnd ]
>         whileFalse: [ 
>           | byteArray |
>           byteArray := ByteArray new.
>           file read: 4096 into: byteArray.
>           response stream nextPutAll: byteArray.
>           response flush ] ]
> 
> I can see that a WABufferedResponse does nothing with #flush so I’m wanting to use either the WAComboResponse or the WAStreamingResponse for this callback. However, I can’t see how to configure a single response to use either of these classes.
> 
> From what I can see, it looks like the response is configured in the server adaptor. Since this single download callback is the only request that needs to stream it’s response, is there a way to use a WACombeResponse or a WAStreaming response for one particular callback?
> 
> Any advice would be greatly appreciated.
> 
> Cheers,
> 
> Jupiter
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


More information about the seaside mailing list