Skip to main content
October 29, 2012
Question

letter case issue with FileFilter on linux

  • October 29, 2012
  • 1 reply
  • 921 views

Hi

I posted this question also on actioscript.org forum but noone seems to have a clue.

Here is the description of what i'm doing:

I'm using standard as3 setup to upload files with FileReference object.

I'm calling browse() method on FileReference object instance to allow user to select files.

I'm passing browse() method FileFilter object instance to filter by file extension.

Here is the filter string: *.jpg;*.gif;*.jpeg;*.JPG;*.GIF;*.JPEG

On windows machine i can see files with file extension of both cases: upper and lower But on linux machine only the files with lower case are visible.

I did found on this forum someone quoting from

livedocs.adobe.com/livecycle/es/sdkHelp/common/langref/flash/net/FileFilter.html

A description with Windows file extensions only

A description with Windows file extensions and Macintosh file types

From my experience on linux machine file filter also works and limits the visible files correctly though i doesn't display files with upper case extensions.

I hope here on adobe forums someone will know.

Thanks a lot

This topic has been closed for replies.

1 reply

Participant
February 13, 2013

I'm currently dealing with this problem as well. I have exhausted my options and haven't been able to resolve the issue yet.

Inspiring
February 13, 2013

If you look into the original FileFilter class you will notice that the comments for the second and third argument indicate that the macType property is case sensitiv:

The extension property contains

         * a semicolon-delimited list of file extensions,

         * with a wildcard (~~) preceding each extension, as shown

         * in the following string: "~~.jpg;~~.gif;~~.png"

The macType property contains

         * a semicolon-delimited list of Macintosh file types, as shown

         * in the following string: "JPEG;jp2_;GIFF".

Have you tried moving the case sensitiv variations to the macType, maybe that will do that trick?

var imagesFilter:FileFilter = new FileFilter("Images", "~~.jpg;~~.gif;~~.png","JPEG;GIF;PNG");

Participant
February 13, 2013

I tried moving the case sensative variations to the macType argument but the problem still remains. Only files with lowercase extensions are shown in the dialog box (in linux):

fileReferenceList.browse([new FileFilter("Audio files","*.wav","WAV")]);