Explorer

Wrong Content-Type set on Uploaded zip archive file

I'm having a problem trying to load a generic binary file (e.g. 7-zip archive, but also occurs for other file types) on my site for users to download.  Using the Build consoles File tile, or adding a Link to Text, and then Uploading the zip file from my PC creates the site file link as expected.

However, after publishing, activating that link on the published site results in the browser attempting to display the contents on-screen.  This occurs independent of browser type being used, and for files uploaded from differnet PCs.  A browser trace of the server response to the GET request shows the Content-Type of the file as text/plain - hence the browser attempt to display it, rather than simply download.  Other uploaded media files e.g. audio, show appropriate content type and render correctly.  The request / response exchange is shown below.

 

Clearly there's something I'm missing in understanding of file upload.  Any suggestions?

thanks.

 

34882945_10216868562286016_7707331912322252800_n.png

3 REPLIES
Community Manager

Re: Wrong Content-Type set on Uploaded zip archive file

Have you tried uploading a regular .zip file instead, @KevinB?

- Adam
Senior Community Specialist
Explorer

Re: Wrong Content-Type set on Uploaded zip archive file

Have just tried a .zip file.  This worked correctly thanks, with Content-type on download responding as application/zip.  I wonder if there's a reference list of file types that can be handled by the File Upload under Build.

 

thanks for the assistance, Adam

Community Manager

Re: Wrong Content-Type set on Uploaded zip archive file

I would guess that most of the usual things people would upload are fine, i.e. zips, mp3, mp4, image files, text files, etc. Not that 7z is an unusual file type, though it's less common.

- Adam
Senior Community Specialist