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 ?
Go to Solution.
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