I have a working s3 uploader in actionscript that uses the FileReference class so a user can browse for files to upload when he/she clicks on the upload button.
I have a web application and I want the user to have his/her configuration saved to s3 as an XML file when they hit the save button, so the "save" button will trigger the upload. However, i cant figure out a way to add the XML file to the FileReference variable I create. I was looking at the File class but that appears to be only usable in AIR.
Is it possible to create a FileReference object based off of 开发者_C百科an XML file that actionscript creates within the application without browsing for a file using FileReference.browse(); ?
Thanks
The answer to my original question is "no". According to this article by Mike Chambers, you cant.
It is apparently a sandbox issue so that a malicious flash program will not be able to do anything related to saving files without a users permission.
精彩评论