[Seaside] How to make an upload page
Fri, 22 Mar 2002 10:41:55 -0800
Alain Fischer wrote:
> Hello all,
> Thanks to Avi for having done this quite impressive framework
> I finally have found time to try Seaside and the first impression is
> quite good.
> I have tried to develop a small application with Seaside and with
> The result is that just with the tutorial and some information from the
> list I was able to develop more rapidly with Seaside.
Very good to hear.
> The text input work well but I don' know how to have access to the file
> in the input box nor I know how to have access to the data of the file.
> I have tried to put the atribute name="@filestuff" but the method with the
> corresponding name is never called. I think that I miss something
> very basic but I don't figure out what.
> With WebObject there is a WOFileUplod component with two binding:
> filePath and data
> and this kind of operation is quite easy except that the filePath is
> dependent of the browser.
> Any bits of information is welcome.
Hmm... the file upload tag is on my list of things to do some time but
we haven't got to it yet - so that's why it doesn't work :)
What would you want the behaviour to be? Should it dump the data to a
temporary file somewhere and give you the filename? Should it return a
stream object with data in it that you could write to a file? I'm
assuming the former might be better since you don't know how big the
file might be and probably don't want to keep it all in memory.
I'll try and get to this today or over the weekend. If you wanted to
poke more you'd need to look at implementing a subclass of IAInput to
handle 'file' types... but then Seaside does currently get multipart
data from the webservers and I haven't even looked how that should work
yet... the key parts are going to be IAKom and IARequest.
Beta4 Productions (http://www.beta4.com)