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?
I’m having trouble working on FileReference download(URL) function . I needed to automatically download
Share
I’m going to assume “automatically download” means “save” here. Nope, If you use
FileReference(orFilein 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
SharedObjectclass: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/SharedObject.html. By default you can createSharedObjects of up to 100KB without needing the client’s permission (see the description ofgetLocal()), which should be fine for more simple text or xml info – you can compress it usingByteArrayif 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.