0

As you can see my code. I want that when someone clicks on the image the video get downloaded to the device. I have tried to code but when i click on the image it open a HTML5 video play instead of downloading. Can someone help with this code.

<p>Click on the w3schools logo to download the video :<p><a href="https://rr2---sn-o3o-qxaz.googlevideo.com/videoplayback?expire=1645528580&ei=pHEUYrN02YCHBtf6mIgP&ip=54.85.142.246&id=o-AIfHFv3b9xkFI4jHB2fKmIk540PGChGAN8iEEkLVmN9c&itag=22&source=youtube&requiressl=yes&vprv=1&mime=video%2Fmp4&ns=Uzk-AULVZFTFZWgublBCAp8G&cnr=14&ratebypass=yes&dur=513.486&lmt=1579375889869681&fexp=24001373,24007246&c=WEB&txp=5535432&n=NcdPMFfVtvCiCQ&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Ccnr%2Cratebypass%2Cdur%2Clmt&sig=AOq0QJ8wRQIhALMRdd7ASygtdWZpBkp3oONGQ90guRutSvmWRPgXUlnAAiBLRF3QJQiJrDOmjflq_wRg2QPP4BM-f_uwlylr8WTMYw%3D%3D&redirect_counter=1&rm=sn-p5qeek7z&req_id=25bfb83afde8a3ee&cms_redirect=yes&ipbypass=yes&mh=hc&mip=14.139.236.98&mm=31&mn=sn-o3o-qxaz&ms=au&mt=1645506522&mv=m&mvi=2&pcm2cms=yes&pl=24&lsparams=ipbypass,mh,mip,mm,mn,ms,mv,mvi,pcm2cms,pl&lsig=AG3C_xAwRQIgSiFyQD7I1ItAVi-a3O4I2WXTfir6o-KkDIXE8SPAqYUCIQDUqt_Sde42YIX_XGKwyCJKEhKfNrJSClxXyA_ZePif0g%3D%3D" download="myvideo ">  <img src="/images/myw3schoolsimage.jpg" alt="myvideoimage" width="104" height="142"></a>
  • The link to the duplicate question is dead. – Esger Jun 29 '22 at 14:02
  • 1
    The question that the target question linked to was this: https://stackoverflow.com/questions/60522840/html-download-attribute-redirects-to-url-instead-of-downloading @Esger – MrWhite Jun 29 '22 at 14:12

0 Answers0