Asynchronous File Upload – YUI’s Approach

The guys at thecodecentral.com had developed pretty nice implementation of Asynchronous File Upload. It worked quite smooth as I tested it, here is what they say:

The theory that makes asynchronous file upload work is not complicate, but the code for it to work can be a little bit lengthy if it was developed from the scratch. Since there no reason to reinvent the wheel and YUI’s Connection Manager can take care of most of the dirty jobs for us, in this article, I’ll show you how to use it to do a simple asynchronous file upload. Because XMLHttpRequest object does not support file upload, the Connection Manager uses inline frame approach. Basically what the Connection Manager does is it creates an invisible IFRAME for file upload and parses the server response once the upload is completed. In the end, what you get is an illusion of Ajax-like file upload interaction. However, since this is an IFRAME, some Ajax events such as success or failure are not available in IFRAME method as they are available in regular Ajax request in YUI.

Try their demo example here
Their original post is here

Also check this solution. Its made the old-school-way with separate iframe file but also has implemented progres bar icon wink Asynchronous File Upload   YUI’s Approach

No related posts.

  1. I tried to use it but doesnt work with mozilla 3

  2. Hey, cool tips. I’ll buy a bottle of beer to that person from that chat who told me to go to your blog :)

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

Read previous post:
Silverlight 1.0 Released and Silverlight for Linux Announced

Today Microsoft announced the release of Silverlight 1.0, the fully supported version of its cross-browser, cross-platform plug-in for delivering the...

Close