Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ZIP file content type for HTTP request [duplicate]

I am sending a zip file to server via HTTPREQUEST. What should be the Content-Type HTTP header value for this kind of file?

The file is a ZIP archive that contains images on type PNG.

Thanks

like image 491
user2960510 Avatar asked Nov 20 '13 15:11

user2960510


People also ask

What should be the Content-Type for ZIP file?

The standard MIME type for ZIP files is application/zip .

What are the contents of a ZIP file?

ZIP files work in much the same way as a standard folder on your computer. They contain data and files together in one place. But with zipped files, the contents are compressed, which reduces the amount of data used by your computer. Another way to describe ZIP files is as an archive.

What is ZIP file encoding?

ZIP is an archive file format that supports lossless data compression. A ZIP file may contain one or more files or directories that may have been compressed. The ZIP file format permits a number of compression algorithms, though DEFLATE is the most common.


3 Answers

.zip    application/zip, application/octet-stream
like image 145
flashdisk Avatar answered Oct 12 '22 04:10

flashdisk


The standard MIME type for ZIP files is application/zip. The types for the files inside the ZIP does not matter for the MIME type.

As always, it ultimately depends on your server setup.

like image 53
Krumelur Avatar answered Oct 12 '22 03:10

Krumelur


[request setValue:@"application/zip" forHTTPHeaderField:@"Content-Type"];
like image 4
Mundi Avatar answered Oct 12 '22 04:10

Mundi