Phiras\’s Blog

April 21, 09

Ajax File Upload

Filed under: WEB-APP — Tags: — phiras @ 1:58 pm

Yes, XMLHttpRequest doesn’t allow sending multipart/form-data for security reasons.
People comes whit many alternative solutions to Ajaxifying their uploaders, using Flash(vimeo.com video uploader) or using iframes with javascript.

Maybe the iFrames solution is the most popular one, but for me, I don’t like iframes, maybe because they are making the work more complicated, and messy!

While I am working on youz.de project, I had to built fully ajax interface, and uploading files was one of the important things, and I had to go for the mess of iFrames.

Fortunately I find this amazing jQuery plugin : jQuery file uploader, this plugin encapsulates the dirty work of iFrames perfectly!

with jQuery file uploader it is a matter of 10 lines of javascript code to upload files.

-Firas

Create a free website or blog at WordPress.com.