XHR File Upload
Project Home • Forums • Known Issues • Contact Project
Uploading files to a web site can be a poor user experience: one file at a time, no feedback telling you when it will be done uploading, etc. In the past, numerous Flash embeds or Java applets made the experience better by including a progress bar. But I wanted to find a better way, and the latest HTML browser specifications provide just that!
This is NOT a turn-key solution. It is rather a minimal code set (two files) that provides a foundation for you to integrate into your applications.
I wanted to make this a RIAForge project because the information I needed to learn to make this work was scattered all over the Internet. Having it in one place as a working example sounded like a good idea.
Finally got around to adding the zip file with the ACTUAL code. These two files represent a functioning implementation. It was tested to work on latest FF, Chrome, and Safari (the releases, not nightly builds).
I apologize for the absence of commenting, I didn't want that to get in the way of my uploading the files. Newer versions to come soon with commenting and different ways to show upload progress.
The "upload" member of the XMLHttpRequest object is very new, and only supported in the most recent (as of the time of this writing) Gecko and WebKit browsers (i.e. Firefox, Safari, Chrome). I haven't yet tested Internet Explorer at all, I welcome comments or suggestions, or even SVN patch files with solutions. Here are some specs of what I used to make this work. These aren't necessarily what's absolutely needed, however.
* Adobe ColdFusion 9.0.1
* One of: Chrome 8.0.552.224, Firefox 3.6.13, Safari 5.0.3(7533.19.4)
Note: the browsers were all running under Windows XP at the time of development.
There are no issues for this project.
To enter issues for this (or any other) project, you must be logged in.
You may access this project's Subversion repository with your client here: http://svn.riaforge.org/xhrfileupload.
To view files and changelists associated with this repository, go here: http://xhrfileupload.riaforge.org/index.cfm?event=page.svnbrowse.
Anonymous users have read access to the repository while the administrator has write access.
This project is sharing its code via Subversion. Subversion is an open source source control method. You may find more information about Subversion here: http://subversion.tigris.org/
Adobe and the Adobe product names are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States and/or other countries.