跨平台JS通过插件访问本地文件系统?

发布于 2024-08-19 13:47:56 字数 689 浏览 3 评论 0原文

我有一个基于 YUI JS 库构建的 javascript 照片管理器,它可以通过 REST api 组织来自许多站点的照片。我想知道是否可以重复使用任何这些代码来组织本地文件系统上的照片。

我需要一个跨浏览器(即 PC/Mac)解决方案来实现以下功能(按权限递增的顺序):

  1. 持久文件访问 读/写本地 XML 数据文件(在会话之间)
  2. 管理大型上传的能力我的服务器的
  3. 缩略图文件夹+文件访问权限以扫描文件夹树中的 JPG。用户通过拖放授予的权限
  4. 执行本地 shell 脚本以生成缩略图的能力

我查看了以下内容并发现了一些缺点:

  • BrowserPlus - 无法在会话之间保存对本地 FS 的访问
  • GoogleGears - 通过以下方式本地访问文件对话框,只有
  • Adob​​e Air - 这是一个可能的解决方案吗???我可以重用我的 JavaScript 吗?

有人可以告诉我这在 Air 中是否可行,或者是否有其他插件选项/策略?

注意:只要我不必同时编写 PC/Mac 版本,我就可以接受像 Adob​​e Air 这样的下载和安装解决方案。这是否意味着它不是一个安全漏洞?另外,我可以在 Adob​​eAir 中重复使用我的 YUI/Javascript - 还是我必须从头开始?

蒂亚米

I have a javascript photo-organizer built on the YUI JS libs which can organize photos from many sites via REST api. I want to know if I can resuse any of this code to organize photos on the local filesystem.

I need a cross-browser (i.e. PC/Mac) solution to the following (in order of increasing privilege):

  1. persistent file access to read/write local XML datafile (between sessions)
  2. ability to manage large uploads of thumbnails to my server
  3. FOLDER+file access to scan JPGs in a folder tree. permission granted by user via drag-drop
  4. ability to execute local shell script to generate thumbnails

I've looked at the following and found some short-comings:

  • BrowserPlus - no way to save access to local FS between sessions
  • GoogleGears - local access to files via dialog box, only
  • Adobe Air - is this a possible solution??? can I reuse my javascript?

Can someone tell me if this is possible in Air, or if there are any other plugin options/strategies?

NOTE: I could live with a download and install solution like Adobe Air, as long as I don't have to write both PC/Mac versions. Does that make it NOT a security hole? Also, can I reuse my YUI/Javascript inside AdobeAir - or do I have to start from scratch?

tia, m.

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

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

发布评论

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

评论(1

挖个坑埋了你 2024-08-26 13:47:56

Adobe Air 是一个独立的运行时。它可以让你做你想做的事,但它不在浏览器内运行,而是要求用户首先将应用程序安装到他们的桌面上(尽管它是跨浏览器和跨平台的)。

浏览器内的 Flash(或 Flex)插件也许可以做一些您想做的事情,但我怀疑它是否能让您自由地控制本地文件系统来管理照片。您将能够在本地共享对象(类似于 Cookie)中存储一些持久数据,但数量很少。

Adobe Air is a standalone runtime. It will let you do what you want, but it does not run inside Browser, and will instead require users to install application to their desktop first (though it is cross browser and cross-platform).

Flash (or Flex) plugin inside Browser may be able to do some of the things you want, but I doubt it will let you free reign on the local file system for managing photos. You will be able to store some persistent data in local shared objects (kind of like Cookies), but very little amounts.

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