New Flickr Uploader is Brilliant
The new upload utility on flickr is damn brilliant. File uploads have always been a challenge for web developers. There are a lot of things to consider, and you constantly have to fight with the browser sandbox. Look ye around on Google for ‘upload progress‘ and you will find one million-jillion ways people have attempted to provide just a simple progress bar. For PHP, it means hacking the internal C code of the language runtime. For other languages, it’s as bad or at least near as bad.
There are other things to consider as well such as timeouts, maximum file sizes, incorrect file types. There’s nothing as frustrating as uploading a 20MB file with no status indicator only to be told the server won’t accept the file format you provided. Also, the built in file selection widget in the browser only supports selecting a single file at a time. People have long since attempted to get around this with IE only Active X components or even the dreaded Java applet.
The newer version of the Flash runtime open up the sandbox a little bit to allow Flash itself to upload files. Flickr uses this magic behind the scenes. It’s really fantastic. The file browser allows you to select multiple files using your OS native file chooser. It limits the selectable file types to ones that are accepted by the service. It will show you the files you’re going to upload along with their sizes. It shows you the upload progress on a per file level as well as for the whole process. It’s the by far, the bestest in browser upload experience I’ve had.
