rodriguezmink
New Member
I try to upload a file by file drop plugin but I can not get the file in UploadHandler.ashxWhat do I need to do is to upload a file\[code\]<fieldset id="zone"> <legend>Drop a file inside…</legend> <p>Or click here to <em>Browse</em>..</p></fieldset><script type="text/javascript"> // Tell FileDrop we can deal with iframe uploads using this URL: var options = { iframe: { url: 'UploadHandler.ashx'} }; // Attach FileDrop to an area: var zone = new FileDrop('zone',options); // Do something when a user chooses or drops a file: zone.on.send.push(function (files) { alert(files.count.toString()); // if browser supports files[] will contain multiple items. for (var i = 0; i < files.length; i++) { files.SendTo('UploadHandler.ashx'); //var file = files; } });</script>\[/code\]and UploadHandler.ashx\[code\]context.Response.ContentType = "text/plain"; HttpFileCollection httpfiles = context.Request.Files; for (int i = 0; i < httpfiles.Count; i++) { HttpPostedFile file = httpfiles; file.SaveAs(@"C:\"+ Path.GetFileName(file.FileName.ToString())); } context.Response.Write(httpfiles.Count.ToString());\[/code\]How do I get the file by context.Request.Files;