Is it possible to upload a file with AJAX and no iframe or Flash?
Every time I have looked into AJAXy file uploading, an iframe has always been used underneath, somewhere.
Is it possible to upload a file using AJAX and no iframe or Flash? How about in the more recent versions of Firefox and Chrome?
I'm debating with my co-workers, arguing that you cannot perform an AJAXy upload with pure Javascript, since you cannot read the file contents from the user's harddrive in order to pass in the file contents via the AJAX call to the server side script开发者_如何转开发.
You can use the file API on firefox (3.6 and above) and I think the latest webkit supports it as well (not sure) though.
I did a Mootools plugin that works on FF:
http://mootools.standupweb.net/dragndrop.php
You can use famous jQuery Uploadify plugin.
Uploadify is a jQuery plugin that integrates a fully-customizable multiple file upload utility on your website. It uses a mixture of Javascript, ActionScript, and any server-side language to dynamically create an instance over any DOM element on a page.
I also use Valums File Uploader
精彩评论