intelliproject logo

Location: Web development - PHP    License: The GNU Lesser General Public License

Ajax File Uploader

Posted by Rochak Chauhan

Upload file to server without refreshing the page

Skill: Intermediate

Posted: 23/11/2008

Views: 790

Rating: 2.50 /5

Popularity: 0.75

Sign Up to vote for this article

Introduction

Well Anyone who has used Ajax will tell you that one of the few things Ajax can not do is to upload / post files. Having said that, there is always a workaround. Here is my class which enabled you to upload files without refreshin the page.

Online Demo: http://demo.dmwtechnologies.com/PHP/AjaxFileUploader/

This class can be used to browse files uploaded via Web forms using AJAX methods to send the files without reloading the form page.  There is auxiliary Javascript code that can upload in the background a file that the users chooses in a Web page form and updates the upload message status in the page.

A server side auxiliary script gets the uploaded files and copies to an upload directory. The class can be used to scan the upload directory and list the previously uploaded files according to different types: image, sound, video and other.

Class Source

Using the class

Screenshot

AjaxFileUploader.jpg

License

This article, along with any associated source code and files, is licensed under The GNU Lesser General Public License

About the author

Rochak Chauhan

www.rochakchauhan.com/blog

Location: India
Home page: http://www.rochakchauhan.com

Sign up to post message on the article message board!