Published on 2006-01-31 09:47:16

I was looking for a solution to upload files using AJAX few months ago, the feature I saw it then in Gmail but didn't find a solution to do it. I just find a solution today, AJAX File Uploader allow to upload files using AJAX methods, now you'll be able to send files without reloading the 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.

http://ajax.phpmagazine.net/upload/2006/01/gmail-upload-thumb.png


The script have been written for PHP5, if you want to use it for PHP4 you need to make some changes and replace "PRIVATE" with "VAR" in the AjaxFileuploader class, and remove "PUBLIC", "PRIVATE" and "PROTECTED" keywords before the functions. An excellent example to make AJAX forms now able to send all kind of data even binaries.


Related Entries

Member of the PHP Magazine Network, Copyright (C) 2005-2008 phpmagazine.net All Rights Reserved