x

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.

image

Tags (2)
819 Views
Message 1 of 4
Report
1 Best Answer
Square

Best Answer

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.

View Best Answer >

776 Views
Message 5 of 4
Report
3 REPLIES 3
Square

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

805 Views
Message 5 of 4
Report

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

795 Views
Message 5 of 4
Report
Square

Best Answer

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.

777 Views
Message 5 of 4
Report
This thread has been archived and locked. Please start a new thread if you would like to continue the conversation.