[Seaside] How to make an upload page
Fri, 22 Mar 2002 16:34:53 -0800 (PST)
On Fri, 22 Mar 2002, Avi Bryant wrote:
> On Fri, 22 Mar 2002, Alain Fischer wrote:
> > But now I am stopped since a few hours trying to make a page to upload
> > a file from a client to the server without result.
> Ok, here's a quickly thrown together file upload element. It only works
> with the Comanche adaptor for now - we'll write a more general version
> later. Same bindings as WOFileUpload - filePath (a string) and data (a
> stream). There's a simple example in IAMultipartTest.
Thinking about it a little longer, I don't really see why it should be a
stream (since it has to already be completely read into memory anyway),
nor why it should have to be two bindings. So unless there are any
objections I'll probably change the interface to a single binding that
provides some kind of IAFile object, with two methods - #fileName and
#contents - both returning strings. Oh, and I guess #contentType as well,