<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
Is that JavaScript on a static page or is it generated by Seaside? I would suggest writing your jQuery with the Seaside package. That way, you can just call a method on your WAComponent and receive the data that way.<div><br></div><div>http://demo.seaside.st/javascript/jquery</div><div><br></div><div>RS<br><br><div><div id="SkyDrivePlaceholder"></div>&gt; Date: Fri, 22 Feb 2013 09:28:31 -0800<br>&gt; From: unseokyeo@gmail.com<br>&gt; To: seaside@lists.squeakfoundation.org<br>&gt; Subject: [Seaside] Multiple file upload with jquery ajax and FormData<br>&gt; <br>&gt; Hi Smalltalkers,<br>&gt; <br>&gt; I am an absolute newbie to smalltalk (and seaside) in need of your great<br>&gt; wisdom on file upload.<br>&gt; <br>&gt; What I am trying to do is allow users to drag a file (or files) from their<br>&gt; desktop and drop it to a &lt;div&gt; tag to trigger file upload.  I have it<br>&gt; working with php but not sure how to translate this to *smalltalk way*.<br>&gt; <br>&gt; On the browser side I am doing the following using javascript (and jquery):<br>&gt; 1. preventDefault() on both 'dragover' and 'drop' to prevent browser from<br>&gt; opening the file on drag and drop.<br>&gt; 2. append each file to FormData :<br>&gt; <br>&gt;    for (filename in filelist) {<br>&gt;       formData.append(filename, filelist[filename]);<br>&gt;     }<br>&gt; <br>&gt; 3. Then fire an ajax call with formData:<br>&gt; <br>&gt;         $.ajax({<br>&gt;                 *url: 'php/fileupload.php'*,<br>&gt;                 data: formData,<br>&gt;                 processDate: false,<br>&gt;                 contentType: false,<br>&gt;                 type: 'POST',<br>&gt;                 success: function(data) {<br>&gt;                         alert("File upload completed");<br>&gt;                         removeAll();<br>&gt;                 },<br>&gt;                 error: function(a, b, c) {<br>&gt;                         alert("Error: " + c);<br>&gt;                 }<br>&gt;         });<br>&gt; <br>&gt; But, I am lost when it comes to target url (in red) for this ajax request.<br>&gt; <br>&gt; On the server side, I have a simple php that handles the request:<br>&gt; <br>&gt; &lt;?php<br>&gt;     foreach ($_FILES as $filename =&gt; $file) {<br>&gt;       if ($_FILES[$filename]["error"] &gt; 0) {<br>&gt;         echo "Error: " . $_FILES[$filename]["error"];<br>&gt;       } else {<br>&gt;         move_uploaded_file($_FILES[$filename]["tmp_name"], "upload/" .<br>&gt; $_FILES[$filename]["name"]);<br>&gt;       }<br>&gt;     }<br>&gt; ?&gt;<br>&gt; <br>&gt; Your help will be greatly appreciated.<br>&gt; <br>&gt; <br>&gt; <br>&gt; Un-Seok<br>&gt; <br>&gt; <br>&gt; <br>&gt; --<br>&gt; View this message in context: http://forum.world.st/Multiple-file-upload-with-jquery-ajax-and-FormData-tp4671533.html<br>&gt; Sent from the Seaside General mailing list archive at Nabble.com.<br>&gt; _______________________________________________<br>&gt; seaside mailing list<br>&gt; seaside@lists.squeakfoundation.org<br>&gt; http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside<br></div></div>                                               </div></body>
</html>