如何将文件从网络应用程序保存到用户磁盘?

发布于 2024-09-30 17:38:25 字数 257 浏览 0 评论 0原文

我正在开发一个网络应用程序,除其他外,每当用户单击按钮时,该应用程序都需要将小文件保存到用户硬盘驱动器上的特定文件夹中。该文件将用作另一个桌面应用程序的输入,因此必须将其保存在预定义的文件夹和预定义的格式中。 “另存为...”和保存对话框会非常不方便。另外,将所有下载设置到该文件夹​​也会很麻烦。

此外,更改桌面应用程序也不是一个选择。

在网络浏览器和网络标准的当前阶段,最好的方法是什么?

是浏览器自定义插件的开发吗?还是闪光/银光?还有别的事吗?

I'm working on web application which, among other things, needs to save small file to particular folder on user's hard drive whenever user clicks a button. That file will serve as input for another desktop application so it must be saved in predefined folder and predefined format. "Save as..." and save dialog would be very inconvenient. Also setting that all downloads go to that folder would be troublesome.

Also, changing desktop application is not an option.

In current stage of web browsers and web standards what would be the best approach?

Is it development of custom plug in for browser? Or flash/silverlight? Something else?

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

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

发布评论

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

评论(3

放血 2024-10-07 17:38:25

首先,这不能通过 http 和 html 实现。

如果这是一个受控环境,也许您只需向用户提供定制的便携式 Firefox 就可以逃脱惩罚。当然,所有其他下载也将进入该文件夹。

First of all this is not doable via http and html.

If this is a controlled environment maybe you could get away with simply providing a customized portable firefox to your users. Of course, all other downloads would go to that folder as well.

孤独患者 2024-10-07 17:38:25

从网站加载的任何内容都不允许访问计算机的 HD,这是有充分理由的。

抛开这一点;您可以给它一个新的扩展名,并将一个程序与它关联起来,将其保存在正确的位置,然后用户需要做的就是检查“始终执行此操作”或单击按钮时使用该程序打开文件。

Anything thats loaded from a website isn't allowed to access the computers HD, and with good reason.

That aside; Could you give it a new extension and associate a program with it that saves it in the correct place, all the user then needs to do is check 'always do this action' or something to open the file with the program when the button is clicked.

坐在坟头思考人生 2024-10-07 17:38:25

也许另一种方法是让桌面应用程序在需要时从您的 Web 应用程序检索文件 - 这可行吗?

这种方法意味着您无需担心 Web 浏览器的沙箱保护,这些沙箱保护会阻止 Web 应用程序了解太多有关客户端文件系统的信息。

Perhaps a different approach would be to have the desktop application retrieve the file from your web-application when it needs it - is this feasible?

This approach means you need not concern yourself with the sandboxing protection of web browsers that prevent web-applications knowing too much about the clients file-system.

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