Expand my Community achievements bar.

SOLVED

Onclick of the link or button - How to download mp4 video into system downloads. instead of opening the video in the browser

Avatar

Level 2

Onclick of the link or button - How to download mp4 video into system downloads. instead of opening the video in the browser

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@Kummari_DilipKu Ensure that the Content-type header has a value of 'application/octet-stream'  and Content-Disposition header has a value 'attachment' and if it is an anchor tag add a 'download' attribute in the in anchor tag.

 

https://www.w3schools.com/tags/att_a_download.asp

 

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

@Kummari_DilipKu Ensure that the Content-type header has a value of 'application/octet-stream'  and Content-Disposition header has a value 'attachment' and if it is an anchor tag add a 'download' attribute in the in anchor tag.

 

https://www.w3schools.com/tags/att_a_download.asp