[Seaside] Value of a fileUpload element?
Jan van de Sandt
jvdsandt at gmail.com
Wed Jan 14 15:20:26 UTC 2009
I am creating a form which includes a fileUpload element. Whenever the user
changes the file I want to receive a callback with the new filename so I can
do some server-side changes like setting the correct Content-Type etc.
I am using Seaside 2.9.0-alpha2 with JQuery.
Currently the fileUpload code looks like this:
html paragraph: [
id: (uploadId := html nextId);
onChange: ((html jQuery id: 'pid') load
addParameter: 'dummy' -> ((html jQuery id: uploadId)
html: [ :h | self hanldeNewFile: h. h text: 'Haai'
I can add the filename to the callback url using addParameter: but I don't
know how to read this parameter from the callback Smalltalk code. I also
tried to "serialize" the fileUpload element but this doesn't seem to work
for file input elements.
Can anobody tell me how I can read the parameter value from the callback
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the seaside