Is it possible to drag and drop files from local file system into a Flex application?
I would like to know if it is possible to create a Flex application accepting the drop of local files?
The aim is to only retrie开发者_JAVA百科ve the full path/name of the file in the local file system.
Google results are mainly about dragging and dropping items inside a flex application.
Thank you in advance.
Unfortunately, not with a browser-hosted Web application, no -- the drag-and-drop APIs are only available to Flex applications targeting Adobe AIR.
No. And due to security concerns, flex doesn't let you read the full path name of the file even while uploading a file.
As others have said, due to security issues, you cannot using Flex. You can however use AIR which is desktop-based, to drag and drop things into it, using the dragManager().
You can use a Flex-Iframe (link) to display a html-page inside your flex application and handle upload functionality there. Then you can either upload the file via php or pass information to flex via ExternalInterface. This will not work in IE however.
精彩评论