Posts Tagged ‘jquery ajax file upload’

Ajax file upload with jQuery and PHP

Written by pelister. Posted in Jquery

Ajax has transformed the web entirely by providing high level of interaction with web pages and superior design capabilities. It is widely used to send and receive data without the need to refresh the pages. If you are programming with Javascript or jQuery, at one point of time you might have used Ajax to submit simple html forms. But till today uploading files using Ajax is still a mystery to many. But not a mystery if you know FormData object and FileReader API.

The purpose of this article is to provide a clear example of how to write a file upload using jQuery ajax with drag and drop support. Though the actual code is written in jQuery, we will not be able to achieve a pure jQuery solution, but we need to fallback to the native methods of Javascript to do it. And before going in to the article, I like to bring to your notice that you must consider the browser support while implementing ajax file upload.

Compatibility: Firefox, Chrome and Opera.

Techlister© - 2012