|Happy Thanksgiving to everyone. Here's an early black friday special for readers of my blog. This "Simple PhotoUploader" Adobe AIR application shows an example of doing file uploads with AIR and ColdFusion while leveraging a cool swc I found (ImageShrinker.swc) that allows you to manipulate the images prior to the actual physical upload. This allows you, the developer, to control the size and other properties of file uploads (height / width / output format / shrink ratio / etc.) before the file actually touches your server. Gone are the days of huge files tying up your server's storage space.
Here are the properties and methods available with the ImageShrinker.swc:
Here's the "Simple PhotoUploader" Adobe AIR application: Simple PhotoUploader.air. The source code is included in the installed application. You will need to install the Adobe AIR runtime if you do not already have it installed.
|A screenshot of the application shows a simple UI - a browse button, a hslider to change the height/width between 75 and 450 pixels, and the display of the image to be uploaded. The application includes a connectivity test - the uploads require a connection to my hosted CF server (the repository for the uploaded images) and feedback via the AIR statusBar.
The next screenshot shows the original image size:
The last screenshot shows the final image size (hslider was set at 450):