Hello list,<br><br>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.<br>
<br>I am using Seaside 2.9.0-alpha2 with JQuery. <br><br>Currently the fileUpload code looks like this:<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; html paragraph: [ <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; html fileUpload<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; id: (uploadId := html nextId);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; name: &#39;file&#39;;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; onChange: ((html jQuery id: &#39;pid&#39;) load<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; addParameter: &#39;dummy&#39; -&gt; ((html jQuery id: uploadId) value);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; html: [ :h | self hanldeNewFile: h. h text: &#39;Haai&#39; ])].<br>
<br>I can add the filename to the callback url using addParameter: but I don&#39;t know how to read this parameter from the callback Smalltalk code. I also tried to &quot;serialize&quot; the fileUpload element but this doesn&#39;t seem to work for file input elements.<br>
<br>Can anobody tell me how I can read the parameter value from the callback block?<br><br>Regards,<br>Jan.<br><br>