jcoder
jcoder

Reputation: 30055

Getting directory listing using Flash

In flash you can open a file on the user's computer. In flash 9 you can upload and download the file and in flash 10 you can access the contents of the file.

It is secure because the user has to choose the file from a file dialog box to allow flash access to it.

What I would like to do in my application is to get a directory listing of the files/subdirectories in a directory. It's not really any different from uploading a file chosen by the user to list the contents of a directory chosen by the user so I don't see any security implications. I don't need to access the files, just list them,

But there appears to be no way in flash to do this? Am I right or am I missing something?

I can always use a signed java applet instead if necessary but flash seems more appropriate for my particular application so I thought it worth asking the question.

Upvotes: 0

Views: 2079

Answers (1)

PhiLho
PhiLho

Reputation: 41162

It is insecure, unless, perhaps, you ask the user to point to the wanted directory with a folder browse dialog, if we remain in the above logic...
Even them, users can inadvertently give more information than they should with this mean.
Like when they open all the Documents and Settings folder to P2P networks... :-)

Insecure because then people can get interesting file names, perhaps explore browser caches, etc.

Upvotes: 1

Related Questions