Sign in Email. Forgot your password? Ask a Question. How to download file using anchor tag, file mentioned on path of any location. Please Sign up or sign in to vote. See more: C. Hi, I am trying to download file which is available on my computer. I have path available Copy Code.
Posted Nov pm Torakami. Add a Solution. What is the value you are getting in item. Torakami Nov am. This is not my location where my project is present , I am saving outside the project. Accept Solution Reject Solution. In order to download an image click on a href link follow below steps: Step1 : Create a ASHX generic file to download an image. I mean image , or doc , or pdf.. Please suggest. Then you need to change "ContentType" attribute as per file type pdf, doc and others.
First you need to fetch file extenssion and set contenttype as per file type. Ok thanks , can you please help me for some more time. My file is present inside handler folder. Can we have multiple hadler files in one folder , because when i tried to navigate to thi handler filer , its redirecting me to other ones processrequest.
Add your solution here. OK Paste as. Treat my content as plain text, not as HTML. Existing Members Sign in to your account. This email is in use. Do you need your password? Active Oldest Votes. In HTML5, in most browsers you can add a 'download' attribute to the a element. Improve this answer. Community Bot 1 1 1 silver badge. And there is no plans for supporting in the future.
This is not working in mozilla firefox. It is redirecting me back to a new tab when i anchor a. Paul Roub This is not creating a blob automatically.
So instead of creating a blob it is displaying it in browser. Sign up or log in Sign up using Google. Sign up using Facebook.
Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Who owns this outage? Building intelligent escalation chains for modern SRE. Podcast Who is building clouds for the independent developer? Featured on Meta. Now live: A fully responsive profile. Reducing the weight of our footer. Linked 0.
0コメント