Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Download Multiple files in one HTTP request

Tags:

http

php

download

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.

i'm using PHP as a serverside srcipting.

like image 967
bogha Avatar asked Feb 25 '10 07:02

bogha


1 Answers

It is possible to send a multipart response in HTTP:

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.

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

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.

like image 133
Gumbo Avatar answered Sep 23 '22 21:09

Gumbo