Sunday, March 6, 2011

Issues uploading with theweddinglens.com...a quick review.

One of the issues with using theweddinglens.com is that it relies on SWFUploader, an open-source Adobe Flash plugin for uploading images/video clips. Normally it has defined the following acceptable file types in its JavaScript declaration:

file_types : "*.gif;*.jpg;*.png"

The problem is that for case sensitive file systems, such as Ubuntu Linux or MacOS X, the Adobe file browser expects these files to be lowercase .gif, .jpg, and .png files. But many cameras take photos with upper-case .GIF, .JPG, and .PNG files, and on machines besides Windows boxes, filenames are case sensitive. Therefore, some of your guests who run some version of Linux simply will not be able to upload photos without renaming the extensions to lowercase.

The temporary fix for the theweddinglens.com will need include both upper-case and lower case parameters (i.e. *.gif;*.jpg;*.png;*.GIF;*.JPG;*.PNG)". The root cause is actually located deep within the SWFUpload ActionScript, which relies on the flash.net.FileFilter class from Adobe's ActionScript code, which doesn't appear to have any regexp capabilities when searching for file extensions.

One such way is to do something similar within SWFUpload as shown in http://www.colettas.org/?p=252

var filterExtensions:String = "*.gif;*.jpeg;*.jpg;*.png";

// On Linux, file extensions are case-sensitive, so we need to include the
 // upper-case versions of all of these.  It seems to be important to specify
 // the upper-case versions at the beginning of the filter string rather than
 // at the end.
 if (Host.isLinux)
  filterExtensions = filterExtensions.toUpperCase() + ";" + filterExtensions;

The same problem applies to the upload video section too, which only scans for *.asf, *.avi, *.mov, etc. extensions.

So until theweddinglens.com makes these corrections, some your guests may simply not be able to share photos and videos with their sites!

Update: they've fixed it within a matter of 1-2 days! You can now upload without any issues now.

No comments:

Post a Comment