tags:

views:

272

answers:

2

Hello everyone, what I need to do is get a list of files in a folder in a Flex application from the web (i.e. all the files in a location like http://example.com/folder1). Can anyone please help me. Thank you.

Chris

+2  A: 

To get that the list of files in a server directory, you'd need to use a server-side script (.NET, php, Ruby, etc), then pass the list to your Flex app.

Would be something of a huge security issue if you could get that information within a client side Flex app natively... unless you're using AIR on the desktop, in which case you have access to the file system.

Marcus
I am not sure about the security aspect of your answer since the location is web accessible and the client is asking for the information from the server, but I do agree with the solution you provide
asawilliams
The security comment is more referring to the idea of the Flex app being able to natively read the info from the server, instead of via a service layer. That's what it sounded like he was hoping for.
Marcus
There is a security aspect to it - most of the web servers do not allow clients to list any random folder in its web-root - they block it using some rules in the server.
Amarghosh
A: 

have a look at this example http://ntt.cc/2008/02/10/how-to-load-an-image-into-our-flex-application-from-url-with-source.html

streetparade
I am not sure this article applies to this scenario since it is for loading an image that you know the location and the question is for getting a list of all the files at a folder location.
asawilliams