Friday, May 25th, 2007

File Upload with Apollo and JavaScript

Category: Adobe, Articles, jQuery

Kevin Hoyt has posted a very detailed entry on a file upload component that he created with Apollo and JavaScript:

Let’s say that you take a lot of pictures. You take pictures, but you don’t want to think about how to upload them. You’d really like an application to monitor a directory for new images, and then upload them to a server. That kind of rules out the browser – it’s not going to be watching a directory on your desktop for image files, and then automatically uploading them. What about Apollo though? Couldn’t an Apollo application monitor a directory for me? Sure! Let’s make it happen…

The article walks you through the example, using jQuery, and gives details on the Apollo APIs:


  1. // Watcher logic
  2. $( document ).ready( function() {
  4.     // Check for directory
  5.     var watching = runtime.flash.filesystem.File.desktopDirectory;
  6.     watching = watching.resolve( dir );
  8.     // Create it if it doesn't exist
  9.     if( !watching.exists ) {
  10.         watching.createDirectory();
  11.     }
  13.     // Do the initial check and updating of the UI
  14.     update();
  15. } );

Posted by Dion Almaer at 7:05 am

3.5 rating from 39 votes


Comments feed TrackBack URI

It looks very nice. I guess it helps to visualize such a unpredictable uploading process. Thanks for your information.

Comment by Nick — May 25, 2007

Reminds me of ActiveX.

Comment by Jordan — May 25, 2007

And i wrote upload progress bar in JS&perl

Comment by dienow — May 26, 2007

좋은 글 보고 갑니다..

Comment by 조성현 — June 16, 2007

Leave a comment

You must be logged in to post a comment.