沃梦达 / 编程问答 / php问题 / 正文

文件上传;如何利用“分块"?

File uploads; How to utilize quot;chunkingquot;?(文件上传;如何利用“分块?)

本文介绍了文件上传;如何利用“分块"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我(仍在)尝试使用 php 通过 html 表单上传 <200mb 的大文件.

I am (still) attempting to upload large files <200mb via a html form using php.

在我对此进行研究的过程中,我遇到了分块"一词,我明白这个过程可以将文件分解成方便的大小,例如 5mb,然后在服务器端将它们重新组合成完整的文件.

During my research into this I have come across the term "chunking", I understand that this process can break the file into handy sizes such as 5mb and reassemble them into the full file at the server side.

我的问题似乎是我可以从哪里开始?我似乎无法通过谷歌搜索找到正确的资源(或者我可能不知道要搜索哪些术语).

My problem seems to be where I can begin? I seem unable to find the correct resources by googling (Or perhaps I'm suffering from not knowing which terms to search for).

所以我今天希望有机会用基础知识来教育自己,看看会很有帮助的方向.我真的不想下载插件或类似的东西,我更喜欢通过实验来学习.

So what I'm hoping for today is a chance to educate myself with the basics, a direction in which to look would be very helpful. I don't really want to download a plug-in or anything like that, I would prefer to learn by experimentation.

编辑补充:虽然下面的两个答案看起来是正确的,但这让我进入了我作为设计师无法做的事情的领域......如果有人读过这篇文章可以提出建议一种不同的方法,我将不胜感激.

EDIT to add: Although the two answers below would appear to be correct, this takes me into the realm of stuff that I can't do as a designer...If anyone reading this can suggest a different approach I would appreciate it.

推荐答案

Web 浏览器不会将上传内容拆分成块.为此,您必须使用自己的分块"功能.客户端:Flash 程序或 Java 小程序.

Web browsers do not split uploads into chunks. For this you'll have to use your own "chunking" client: a Flash program or a Java applet.

您可以查看 JUpload.wiki里也有例子.

You can take a look at JUpload. There are also examples in the wiki.

来自 SourceForge:

多文件上传小程序 (JUpload) 解决了传统 HTML 上传表单带来的限制,允许您通过单击上传整个目录及其中的文件.或者,它允许简单的图片管理.

Multiple File Upload Applet (JUpload) takes care of the limitation posed by traditional HTML upload forms by allowing you to upload a whole directory and the files within it with a single click. Optionally, it allows simple picture management.

这篇关于文件上传;如何利用“分块"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:文件上传;如何利用“分块"?

基础教程推荐