在一个HTTP请求中下载多个文件 [英] Download Multiple files in one HTTP request

查看:232
本文介绍了在一个HTTP请求中下载多个文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在一个HTTP请求中下载多个文件?
我的意思是,当你有多个附件,你选择你要下载的内容,然后按下载,这样他们将被自动下载,你不需要手动点击每一个。

how is it possible to download multiple files in one HTTP request? what i mean it's like when you have multiple attachments and you select what you want to download then press download so they will be automaticcaly downloaded and you don't have to click on each one manually.

我使用PHP作为服务器端srcipting。

i'm using PHP as a serverside srcipting.

谢谢

推荐答案

可以发送 HTTP中的多部分响应


一般来说,HTTP处理多部分消息体与任何其他媒体类型无异:严格作为有效载荷。 [...] HTTP用户代理应该遵循与MIME用户代理相同或类似的行为,在收到多部分类型时。

In general, HTTP treats a multipart message-body no differently than any other media type: strictly as payload. […] an HTTP user agent SHOULD follow the same or similar behavior as a MIME user agent would upon receipt of a multipart type.

[...]如果应用程序收到无法识别的多部分子类型,应用程序必须将其视为等同于multipart / mixed。

[…] If an application receives an unrecognized multipart subtype, the application MUST treat it as being equivalent to "multipart/mixed".

但由于Firefox是唯一的浏览器我知道要支持这样的多部分响应(除了 multipart / byterange ),您应该使用一些归档文件格式用于此目的。

But since Firefox is the only browser that I know about to support such multipart responses (apart from multipart/byterange), you should use some archive file format for this purpose.

这篇关于在一个HTTP请求中下载多个文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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