拆分之前上传的文件? [英] Splitting a file before upload?

查看:118
本文介绍了拆分之前上传的文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在网页中,有可能将文件上传到服务器之前,大文件分割成块?例如,一个10MB的文件分割成1MB块,并上传一大块在一个时间,同时显示进度条?

On a webpage, is it possible to split large files into chunks before the file is uploaded to the server? For example, split a 10MB file into 1MB chunks, and upload one chunk at a time while showing a progress bar?

这听起来像JavaScript没有任何文件处理能力,但对于Flash和Java小程序?

It sounds like JavaScript doesn't have any file manipulation abilities, but what about Flash and Java applets?

这将需要在IE6 +,Firefox和Chrome工作。 更新:忘了提,(一)我们正在使用Grails和(b)本需要运行通过https

This would need to work in IE6+, Firefox and Chrome. Update: forgot to mention that (a) we are using Grails and (b) this needs to run over https.

推荐答案

您可以尝试 Plupload 。它可以被配置来检查任何运行时可在用户侧,无论是 - 闪光,Silverlight中,HTML5,齿轮等,以及所需的功能使用任何满足第一。在其他方面,它支持图片缩放(在用户侧的,preserving EXIF​​数据(!)),流和多载,并分块。文件可以在用户侧进行分块,然后发送到服务器端的处理程序块逐块(需要在服务器上一些额外的照顾),这样大的文件可以上传到服务器上有最大文件大小限制设置为一个值低得多然后它们的大小,例如。等等。

You can try Plupload. It can be configured to check whatever runtime is available on users side, be it - Flash, Silverlight, HTML5, Gears, etc, and use whichever satisfies required features first. Among other things it supports image resizing (on users side, preserving EXIF data(!)), stream and multipart upload, and chunking. Files can be chunked on users side, and sent to a server-side handler chunk-by-chunk (requires some additional care on server), so that big files can be uploaded to a server having max filesize limit set to a value much lower then their size, for example. And more.

一些运行时支持https我相信,有些需要测试。无论如何,在那里开发者都非常敏感,这些天。所以,你可能至少尝试;)

Some runtimes support https I believe, some need testing. Anyway, developers on there are quite responsive these days. So you might at least try ;)

这篇关于拆分之前上传的文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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