How to implement gmail like file upload/attachment using HTML 5

By | July 12, 2018
Questions:

I remember some options where Ajax like(No post back world) file upload was supported,

  1. Hidden iframe
  2. Using flash object (Though i still have curiosity of why SWF is used ? and what advantages it offer ?)

However by looking at blogs it appears that HTML 5 is promising, i tried some small examples and it really works 🙂

But recently i found that gmail has new drap drop file feature implemented using the HTML 5 (No flash).
Can some one guide me how this can be achieved and what all i need to prepare ? Is there change in XMLHTTP…(Ajax object) api in HTML 5 ?
Any threads will be helpful
thanks all,

Answers:

I could be wrong, but I think the only help that HTML5 gives for such an upload-pattern is that it supports the attribute ‘multiple’ for upload fields.
This allows you to select multiple files from the file-chooser dialog without using flash
.
The uploading itself still has to be done by JS or PHP or [yourfavorite]. A nice helper could be

http://code.google.com/p/jquery-html5-upload/

for example.

Leave a Reply

Your email address will not be published. Required fields are marked *