Uploading files using AJAX


There is no way to upload files using AJAX. How Gmail does it then? Well, the answer is using <iframe>. Here is a post that describe this technique in detail. Infact we are using this technique from months, obviously inspired by Gmail. ;-)

update: Technically speaking, it’s not Ajax. Just an iframe hack. You are absolutly right Pratik.

Sponsors

Information and Links

Join the fray by commenting, tracking what others have to say, or linking to it from your blog.


Other Posts
Ajax based drag drop and sortable tree for Rails
Cheat Sheet
If my code or post helps you then please recommend me at workingwithrails.com by clicking on button below:
Recommend Me

Reader Comments

Technically speaking, it’s not Ajax. Just an iframe hack.

So there is no way to upload files using Ajax.

Some of my AJAX based work -

http://padmanijain.googlepages.com/myexperiments.html

I have used iframes here.

Hi Pratik,
Obviously this is not AJAX. Infact I have mentioned in my very first line that there is no way to upload files using AJAX.

“How Gmail does it then?”

Does what ? ;-)

I love how box.net people do it though. Pretty slick UI.

Oh, and did not know about it. Thanks for the information …

Write a Comment

Take a moment to comment and tell us what you think. Some basic HTML is allowed for formatting.