+ Start a Discussion
Markey1Markey1 

Zip File Download Link Not Working, File Extension Lost - Sites Static Resource

On my SFDC Sites project, I am trying to create a simple download link (i.e. user clicks link and is able to download zip file). When the user clicks the link, they get the standard download box. However, the file extension is lost meaning the user will have to rename it etc. If you are logged into SFDC, the file downloads properly with the ".zip" extension. It is lost when you download it directly from the Site.

 

What am I missing?

 

Visualforce Link:

<apex:outputlink disabled="{!IF(ConfirmLogos == false,true,false)}" value="{!$Resource.Logos}">

 Static Resource Name, MIME Type, Cache Control:

Logos
application/x-zip-compressed
Public

 

Ryan-GuestRyan-Guest

Put your zip file inside another zip file, and upload that file as a static resource.

 

Then visualforce will generate the .zip extension using the following syntax

 

{!URLFOR($Resource.TestZip, 'folder/file.zip')}