下载文件,在本地打开,编辑,然后上传 [英] Download file, open it locally, edit and then upload

查看:141
本文介绍了下载文件,在本地打开,编辑,然后上传的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Web应用程序,让用户正常下载文件,再后来,他们可以上传他们用一个简单的上传机制(选择目录和东西的文件)。

I have a web application that let users download files normally, and then later they can upload them using a simple upload mechanism (choose the files from directory and stuff).

这就是我想做的事:有和我的应用程序的编辑按钮,在下载文件,并从用户的本地驱动器会自动打开。然后我想检查是否有变化,将其上传到服务器。或者,提供了一种用户轻松地上传。

Here's what I want to do: to have and "EDIT" button on my app, that download the file and open it automatically from the user's local drive. Then I want to check if there are changes, to upload it back to the server. Or, provide a way to the user upload it easily.

到目前为止,我已经走的选项,分别是:

The options I've come so far, are:


  • 签名的小程序

我觉得小程序缓慢,丑陋。但它是迄今为止获奖的选择。它可以下载和轻易打开文件,然后上传按钮,将文件放到后面的服务器上。

I find applets slow and "ugly". But it's the winning choice so far. It could download and open the file easily and then have an upload button, to put the file back on the server.


  • HTML 5(文件API)

我开始寻找这个和喜欢我所看到的。但是很多事情,我看到是本地上传,拖拽和这种东西。我很新的这技术,我简单不知道这是可行的。

I started looking into this and liked what I saw. But a lot of things that I saw are for local uploads, drag and drop and this kind of stuff. I'm very new to this technology and I simple don't know if it's doable.


  • 一个桌面应用程序

我不喜欢这个,但它仍然在桌子上。难道一个被监视的小程序(这里要再次重申的)创建一个目录,检查是否有变化,然后上传到服务器。

I don't like this one but it's still on the table. It could one that monitors a directory created by an applet (here it's again), check if there are changes and then upload it back to the server.

结果
有人可以提供我一些帮助吗?如果可以这样做,与HTML 5或是否有更好的解决方案。


Can someone provide me some help? If a can do something like that with HTML 5 or if there's a better solution.

推荐答案

即使您尝试HTML5无法上传无需用户交互文件HTML。这是针对Web fundemantals。用户必须触发的方式,拖动和放文件上传;下降,浏览和选择文件等。
签名的小程序可能比因为部署的痛苦一个桌面应用程序更好的解决方案。
如果该文件是您希望用户编辑基于只是文本,我suggesst使用一个像谷歌基于HTML编辑器,它会为谷歌文档。

You can't upload files without user interaction in HTML even if you try HTML5. That's against web fundemantals. The user has to trigger the file upload in a way, drag&drop, browse and select file, etc. Signed applets might be a better solution than a desktop application because of the pain of the deployment. If this file that you want your users to edit is just text based, I suggesst using an HTML based editor like Google does it for Google Docs.

这篇关于下载文件,在本地打开,编辑,然后上传的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆