cancel
Showing results for 
Search instead for 
Did you mean: 

How to force sample link of downloadable product to download ?

SOLVED

How to force sample link of downloadable product to download ?

Hello,

I need to force the download when a user click on the sample link of a downloadable product. This is my a tag :

<a href="/fr/downloadable/download/linkSample/link_id/3/" download>test</a>

The problem is the href attribute because the link is not ended by a real filename, if the href is for example "/fr/downloadable/download/linkSample/link_id/3/test.txt" then the click triggers the download with the "Save as" popup. 

Is someone has an idea to help me please ?

 

Regards,

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to force sample link of downloadable product to download ?

The solution was the parameter Use Content-Disposition on attachement in catalog/downloadable Product options in backend. This was not a problem of development.

View solution in original post

2 REPLIES 2

Re: How to force sample link of downloadable product to download ?

The solution was the parameter Use Content-Disposition on attachement in catalog/downloadable Product options in backend. This was not a problem of development.

Re: How to force sample link of downloadable product to download ?

But what if we had this already, after updating from 1.9.2x to 1.9.4.3 the jpg and zip links doesn't download anymore, but excel and pdf does.

 

What else could be the problem?

 

var/cache cleared...