If you've used Flickr, you may well have seen their funky uploading tool that lets you pick multiple files to upload and then shows you the status of each as it uploads.
It's very cool, and you may want to copy it on your site. So, how would you do it?
Well ... actually you can, but you have to rely on something happening at the user's end.
- You can force the user to zip up all of the files and upload a single archive (which you can then manipulate and unzip using the standard library functionality of your chosen language).
- You can use a Java Applet, since Java can access files on your machine if you allow it to. This means that the user will have to install the Java runtimes if they don't have them already. You may also need to look into security-signing your applet.
- You can use an ActiveX control. This has the severe limitation that it will only work on Windows systems. Also, you'll probably need to security-sign it to stop dire warnings from appearing when users visit your site, and it probably won't work in Firefox.
- You could use a client application. This gives you lots of control, but breaks the web paradigm slightly and you'll have to think about which platforms you want to code for and support.
- Ah, so how do Flickr do it? They use Flash. It's very nifty, and you might not even notice that it's a Flash application. Uploading multiple files was added in Flash 8 and seems to work well.
Update: 2nd April 2008. We started to look at how this is possible using Flex, and it looks doable using the free version of the tool (if a little painful).
Oh, and we looked at how YouTube does it - they use Java. Interesting.
Meanwhile, Microsoft are pushing Silverlight harder and harder. You can't view some of their webcasts without installing it, and every time you download something you are told you'll get a better experience with it. Perhaps it will reach the tipping point after all?