cancel
Showing results for 
Search instead for 
Did you mean: 

How to force sample link of downloadable product to download ?

SOLVED
Highlighted

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
Highlighted

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

1 REPLY 1
Highlighted

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