javascript - How download files in jquery -


i need implement file download in mvc project. have repository there upload file repository not in project folder i.e. e: drive while running project in c: drive.

i file url info below "http://cdn1.zerofootprint.com.au/assets/4785/photography/mstestdesert.jpg" , a'm binding these url dynamically.

is there ant way download these file of anchor. sample code appreciated.

<div class="image">  <a href="http://cdn1.zerofootprint.com.au/assets/4785/photography/mstestdesert.jpg" >    <img src="http://cdn1.zerofootprint.com.au/assets/4785/photography/mstestdesert.jpg" class="img-responsive" alt="mstestdesert.jpg">  </a>   </div>
in advance..

you use 'download' attribute

js fiddle

<div class="image"> <a href="http://cdn1.zerofootprint.com.au/assets/4785/photography/mstestdesert.jpg" download>   <img src="http://cdn1.zerofootprint.com.au/assets/4785/photography/mstestdesert.jpg" class="img-responsive" alt="mstestdesert.jpg"> </a>  </div> 

Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -