Jump to content

Force Files to Download (Not Open in Browser)


APP

Recommended Posts

Adding a url under a sku. When a user clicks the download button, any browser will open or try to open the file in a browsers tab. Can the file just download when a user clicks the download button and not open in a browser window. Any ideas? Thanks.
Link to comment
Share on other sites

What kind of file is it?

 

If it is a PDF file, then how the browser handles it depends on the user's settings. Do you know what browser the user is view your site on?

Edited by Meir
added "If it is a PDF..."
Link to comment
Share on other sites

Could be any type of file. PDF, tif, mov, jpg, etc. We found a workaround. We adjusted our .htaccess file which is located on the server that hosts our images where the URL links to. This seems to fix the issue. We are able to download any file we identify without it opening first within the browser itself. However, within safari, it will open a blank window and than start to download the file. This is a safari thing the way it interacts with printable. Trying to figure out the best way to stop that from happening. If we can control the URL in the sku from within the printable system then we can fix this. However, the sku url that controls the download button within printable does not allow you to add additional code. Just a plain URL link. For example, I can put specific html code in the instruction field of the sku and I can control the download of the file without opening a blank window. Works in any browser. However, if I put a normal URL link in the download button section of the SKU, it will download the file but first opens up a blank window.
Link to comment
Share on other sites

×
×
  • Create New...