Reputation: 918
I'm having trouble working on FileReference
download(URL) function
. I needed to automatically download the files in a particular space on my harddisk but the SAVE AS dialog always displays. can I make it automatically download
in a certain place on my disk?
Upvotes: 0
Views: 990
Reputation: 8053
I'm going to assume "automatically download" means "save" here. Nope, If you use FileReference
(or File
in AIR), there's no way to automatically save without showing the Save As dialog box.
If you don't need to access the file outside of the app, then take a look at the SharedObject
class: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/SharedObject.html. By default you can create SharedObject
s of up to 100KB without needing the client's permission (see the description of getLocal()
), which should be fine for more simple text or xml info - you can compress it using ByteArray
if you want to save space. Any more than that and a small dialog will open asking permission. Once you've given permission however, it won't ask again.
Upvotes: 1