动作下载使用的FileReference文件 [英] Actionscript downloading a File using FileReference
问题描述
我无法工作的FileReference
下载(网址)功能
。我需要在一个特定的空间来自动下载在我的硬盘文件,但另存为对话框始终显示。我可以让它自动下载
在我的磁盘上的某个地方?
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?
推荐答案
我要承担起自动下载的意思是拯救在这里。不,如果你使用的FileReference
(或文件
在空气中),有没有办法自动保存,而不显示另存为对话框。
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.
如果您不需要访问该文件的应用程序之外,再看看在共享对象
类:<一href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/SharedObject.html" rel="nofollow">http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/SharedObject.html.默认情况下,你可以创建共享对象
的S高达100KB,而无需客户端的权限(请参阅的说明中的getLocal()
),这应该是罚款,更简单的文字或XML的信息 - 你可以COM preSS它使用的ByteArray
,如果你想节省空间。任何比这更多,一个小对话框会打开,询问许可。一旦你却得到许可,也不会再问。
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.
这篇关于动作下载使用的FileReference文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!