开发者

Get path to a file via flash

I'm not a flash dev, but I'm turning to it to try and meet a requireme开发者_开发问答nt. I'm to allow a user to select a file on their computer, then pass it to my web application. I know it's not possible to do this using Javascript, hence wanting to use flash. First, is this possible? Second, can I get a pointer on how its done?

To clarify: I'm just looking for the path to the file. I don't want to upload it.


Well it depends what you want to do with that file. There's the FileReference object that will allow you to browse and upload a file to a server, and from there you can load it into your application. If you're targeting Flash Player 10, then you have access to new api's that will allow you to load the the files directly from the local machine.


You cannot access the local path of a file with Flash. Adobe claims that it's a security risk... I tend to disagree and find that information to be invaluable. Alas, it cannot be done.

You may be over thinking it. Just use FileReference and upload the file onto the server and update your web application of the change. No?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜