[Seaside] [Q] File Upload/Download Server, Comanche or Swazoo
janko.mivsek at eranova.si
Tue Jul 29 11:23:30 UTC 2008
Philippe Marschall wrote:
>> I looked at your code, where you make a subclass of Site where is a test
>> form with file input field , then post via streaming to output file.
>> Problem is that you named file input field as "upload" while in my example
>> it is expected to be "file". So, just adjust those two names and your
>> example should work.
> Nope sorry, the example code was written explicitly to illustrate the
> problem. Upload streaming with Swazoo works only iff you know
> beforehand which fields will be files. There is now way how I can know
> this. Compare this to the upload streaming of Kom which detects which
> fields are files.
I don't understand how there is no way to know which input fields will
be file ones. Web framework is naming them during HTML generation
anyway, I suppose Seaside too?
Bigger problem is that you don't have that knowledge until request come
quite deeply in the web framework and here the idea of "deferred"
request parsing, until information of input field names is known.
> And even then the Swazoo code still breaks in MultiByteFileStream.
I'm otherwise using Sport's Filenane and there is no signs of any broken
code or corruption of uploaded files.
Smalltalk Web Application Server
More information about the seaside