1

I have figured out the drag and drop part but how would I then upload and POST the file to a URL with set parameters?

If I had a form I would just

   <form enctype="multipart/form-data" method="post"  action="url">  
 <input type="?" name="?"/>  
 <input type="?" name ="?" value="?"/>  
 </form> 

How would I do above using the HTML5 drag and drop API???

3
  • I don't understand at all what you mean. Can you clarify? Commented Sep 11, 2010 at 16:52
  • I would like to drag and and drop an image into the browser and have it upload to a website Commented Sep 11, 2010 at 17:06
  • I would like to POST and set parameters like a form Commented Sep 11, 2010 at 17:13

1 Answer 1

1

I think this MDC tutorial is what you're looking for: https://developer.mozilla.org/en/Using_files_from_web_applications

It discusses the drag/drop operation up to uploading the file with the new local file support.

Sign up to request clarification or add additional context in comments.

1 Comment

@Kenshi: Hopefully that's enough, but it would be important to say that I don't think you can add any data from the drop to a fileinput -- you would have to upload that through an AJAX request.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.