Sushant Torankar

Sushant Torankar

  • 1.7k
  • 258
  • 5.1k

About using Download attribute of Html5 in MVC

Aug 8 2020 10:16 AM
hello, Everyone,
Hope everyone is fine.
 
I am trying to download the file in my MVC code using html5 download attribute.
It works with following code:
<a href="/MemoryImage/77915_14960_user-24.png" download="77915_14960_user-24.png" class="item">
 
but I want to download a file from my online URL like : 
<a href="https://blobstorage.blob.core.windows.net/containername/4aac199c-0b6e-499f-a12a-849086e7178a_77915_14960_user-24.png" download="77915_14960_user-24.png" class="item">
 
But it opens the file in new tab, which should not be. It should download that file. 
 
 
Thank you in advance 

Brought to you by:

Answers (4)