Flex 保存 URL 文件对话框

发布于 2024-12-10 01:20:35 字数 199 浏览 4 评论 0原文

我的 Flex Web 应用程序中将有一个 PDF 文档的链接列表。

我想要做的是,单击某个按钮后,打开 URL 列表中某些 pdf 的“另存为”对话框并将其下载到磁盘。

我想避免的是在浏览器中查看 PDF。

我所知道的是 flash.net.FileReference 将获取原始数据但没有链接。那么可能吗?

I will have a list of links to PDF documents in my Flex web app.

What I want to do is that upon clicking some button, open SAVE AS dialog for some pdf from the URL list and download it to disk.

What I want to avoid is viewing PDF in browser.

ALL I know is that flash.net.FileReference will take raw data but no links. So is it possible ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

少跟Wǒ拽 2024-12-17 01:20:35

首先,您可以通过 URLStream 的 load 方法从 url 获取原始数据。将其保存为 ByteArray,然后使用 FileReference.save() 方法将文件保存到本地系统(从 Flash Player 10 开始)。

欲了解更多信息,您可以查看:
http://help.adobe.com /en_US/FlashPlatform/reference/actionscript/3/flash/net/FileReference.html#save()

First of all you can use to get raw data from url by URLStream's load method. Save it as ByteArray and later use FileReference.save() method to save files to local system(starting from flash player 10).

For more information you can see at:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/FileReference.html#save()

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文