在网络浏览器中上传大文件
这是我第一次提问。希望你能帮助我。
问题:我的厨师希望我们的企业应用程序有一个模块,允许客户将非常大的文件上传到我们的服务器。
基础设施: php 5.x / mysql 客户端-服务器应用程序
众所周知的问题: -HTTP 会话超时 - 文件数量和文件大小的上传限制
规则:
- 解决方案不得使用任何小程序(java、flash...),也不得使用任何浏览器插件。 -该解决方案应该允许用户上传任何类型的文件,从简单的图像到任何其他类型的非常大的文件。 -出于安全原因,我们不想更改 php.ini 文件中的设置,也不想更改任何 .htaccess 文件中的设置以允许应用程序上传更大的文件。 -如果存在预先支持的解决方案,它应该是开源的并且可能是免费的。 - 与 AJAX 功能和进度条可视化的集成受到热烈欢迎。
可能的解决方案(告诉我是否可行,如果不可行,为什么?):
- 使用浏览器中的某些 javascript 库通过 FTP 访问 -在浏览器中使用一些 javascript 库通过 WebDAV 进行访问
也欢迎遵守上述给定规则的任何其他解决方案
我知道,我要求的是一个很难找到的东西。
This is the first time for me asking a question. Hope you'll be able to help me.
Problem: my chef wants our enterprise application to have a module which allows customers to upload very large files to our server.
Infrastructure: php 5.x / mysql client-server app
Well known problems:
-HTTP session time out
-Upload limit in terms of number of files and file size
Rules:
-The solution mustn't use any applet (java, flash, ...), neither any browser plugin.
-The solution should allow users to upload any type of files, from simple images to very large files of any other type.
-For security reasons, we don't want to change the settings in the php.ini file, neither in any .htaccess file to allow the app uploading larger files.
-If a pre-backed solution exists, it should be opensource and possibly free of charges.
-Integration with AJAX functionalities and progress bar visualisation are heavily welcome.
Possible solutions (tell me if it's possible, and if it isn't, why?):
-Access by FTP using some javascript library in the browser
-Access by WebDAV using some javascript library in the browser
Any other solutions that respect the above given rules is also welcome
I know, I'm asking for a very hard thing to find.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您所要求的目前是不可能的。目前在所有广泛使用的浏览器中可用的唯一上传文件的技术是标准 HTTP 表单上传,您已经拒绝将其作为解决方案。所有其他可用的解决方案都需要 Java 或 Flash,或者使用浏览器 JavaScript 功能(本地文件访问),但这些功能尚未完全标准化,也不是普遍可用的。
您需要放宽一些要求。
What you're asking for isn't currently possible. The only technology for uploading files which is currently available in all widely used browsers is standard HTTP form uploads, which you've already rejected as a solution. All other solutions available require Java or Flash, or use browser JavaScript capabilities (local file access) which are not fully standardized, nor universally available.
You'll need to relax some of your requirements.
创建一个 iframe 或框架,或浏览器窗口,提供通过 FTP 访问服务器的权限。允许用户将文件拖放到那些至少支持 FTP 的浏览器上。
Create an iframe or frame, or browser-window that offers access to the server via FTP. Allows users to drop files there for those browsers at least who support FTP.