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>
you use 'download' attribute
<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
Post a Comment