CSV download issue - html

I am trying to download one csv file in my html file with anchor tag. Its getting downloaded only as .txt file. Tried few things like download attribute but nothing working.
Please help
<a href="https://xxxxxxxxxxxxx/20140815-111929455-000001-00030-1658.csv?__gda__=1440109223_83f5e968923d7f99b30844358fe4ce4c" download="temp.csv" type="text/csv" target="_blank"/>

What about removing the file name from the download attribute and adding it to your href attribute? Doing it that way should eliminate the need for a target and type as well.
<a href="/path/temp.csv" download>link</a>
I haven't tried this with a csv file before, but it's worked for me with images after checking out a w3schools example.

Related

How to short an path of an file so it can be used to link in web page?

I was trying to link an online available image using img tag but the path of that image is too long although it got inserted but it took a lot space in editor which looks cumbersome.
Here is the path of file I inserted :-
<img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAoHCBYVFRgVFhYZGRgaHBwcHBgcHBgaGhwcHBgZGhwaGBgcIS4lHB4rIRwYJjgmKy8xNTU1GiQ7QDs0Py40NTEBDAwMEA8QHhISHzQrJSs0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NP/AABEIAMIBAwMBIgACEQEDEQH/xAAcAAACAgMBAQAAAAAAAAAAAAAEBQMGAAECBwj/xAA5EAABAwIEBAMHAwMEAwEAAAABAAIRAyEEEjFBBVFhcSKBkQYTobHB0fAyQuEUUvEHYoKSM3KiI//EABkBAAMBAQEAAAAAAAAAAAAAAAECAwAEBf/EACMRAAMBAAICAgMAAwAAAAAAAAABAhEDIRIxIkEEE1FhcYH/2gAMAwEAAhEDEQA/ACGtKIpNXIClarkCVq7CiBXQKYxJKwFcSthYJIFtcgLawDoBaK1mWSsY6AWQthdALG000LtYELi8TFglqlK1hS1nGJxBuGoNuJc25lYx8m+6mDdWagrl5Kqk2vZ1cUyqXl6AX+0gbqJhWvhL/esa+ICrdH2ZY5wcSYmYVywIDGho0Gyjw/s3bZ0/lPg8UuJdhRoj9wkFBY3A5fE3TkmbDmXNN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1v+75oN3CmftzN10Mi9tCoBwt7P0PHUERPohrX0bxl/ZYKdcMYNBGgHbn6oKtxhgsT8fyyW18JVyuAk2tBAvEJXisLUEAsceZAJ2vdCqweZQ1xHGWC3XZBt4xLXTt11VfxOILZDmPHTI75wltTGt0hw/wCJ+Cm6HSQXx3iz8r4kTy+aoraRJVjx9UvAa0EzqYKFp8NedGP/AOp+yeaxdi1OgvDMY+i4EE5ZEt26wNir9heKte0FhnneCN4PqqnT4JXdpQqH/g6PiEywfsvjAQ5lMt/9i0et0KrfRlOF3o18rA86k+IddJ+qifj2aE2n8uhMJwDEuaBVcxsREOc7vNkypezTYAe9x6AAekyl+T9IK8V7Yy4Jx2jTGUugRbcEgaeZCkbxrP4hL5LiGNFwJIAcNAYO6hocIpMghgJ5uumNhZogbJ0qzBW53Tqji6hBblDWbSfFv/bp6qIUGyS4lxtBJkei2XrmSdE3jvsXy/hI56hc9GUOHPfrYdU1oYBjBf4p1IraFOG4a9+thzTrDYFlMTvzK1UxYFm/nkg62IJ3/PonmRXQbiMZFh+fZLa9YlRueonvToU5eVGXrHPUL3ImO86xDZ1iOC6UhimasWKbGR1S1CaBYsSsZezoJph9FixBBZMFsLFiBjsLFixYJ0sCxYsY2uFixAyNKVqxYgYwLaxYiY0VixYiYxYVixYx3RTzCMEaBYsRQKDSl2INysWKiEBSuHLFiJiIqKosWLGIyoXrFiZCsGWLFiIp/9k=" alt="image" title="Makhan bada">
Save the image in a separate file, then use the file path in the href attribute.
<a href="/image/image.jpg" download>Download the image</a>
The download attribute will prompt browsers to download it, rather than opening it.

html anchor to download file from another server

As I have searched, making a download link is like
<a href="image_url.png" download>download</a>
But the image must be in project directory. How to download from another server?
For example if I want to download django logo the code is supposed to be:
<a href="https://www.djangoproject.com/s/img/logo-django.42234b631760.svg" download>download</a>
but that's not working (it opens and shows the image in the current tab instead of downloading), but any file in my own server is being downloaded easily. What is the best way to do that? tnx
You simply need to put name of the file (how it should be saved) in download. Like this:
download
Edit:
Actually I was wrong. You can find the answer here. If you want to download SVG in regular way, like any other file, you need to use JavaScript, not just plain HTML tags. Or you can download it as PNG, but as I assume: that's not the point.
Sorry for mistake.
you put link in href on anchor tag:
download

Download localfile through html

I have a problem: I want to download a file from my website using this link:
<a href="/path/to/file" download>Attachment</a>
But when i click this URL the link gets changed to:
localhost:9000/path/to/file
That means that my firefox does not find the file and cant download it, is there any fix for this?
use the full path in the href of a tag.
like this.
<a href="https://www.google.co.in/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png" download='download'>Click Here to download</a>
hmm Have you tried forcing the download as such:
Save GIF
If this does not help, it most certantly means that your path is wrong. Are you forcing the real filesystem path?
echo realpath(dirname(__FILE__));

<a> download rename not working

currently I am trying to make an <a> tag that will download an xml from a link and I also want that file renamed. I know <a download="test.xml" href="http://www.somesite.com/anothertest.xml"> is supposed to be used to create this effect but the file name remains "anothertest.xml" rather than changing to "test.xml" whenever I download it any ideas on what is causing this?
Browsers don't allow the use of the download attribute to rename a file when the file is from an external server/domain.

HTML web download link for text file

I'm using HTML web and i want, that users could download a file like .vbs (skype bot) and then i use code like this:
<a href='skypebot.vbs' target='_blank'>download</a>
I get just only that file text. How can i make it download link not uploading it to other site like zippyshare?
How can i make it download link not uploading it to other site like
zippyshare?
You can use a data link. Put the contents of your file (encoded with encodeURI() ) in the link itself:
<a href='data:application/octet-stream,encodeURI(hereContentsGoes)' target='_blank'>download</a>
The file is probably being recognized as a vbs type by your browser, and trying to display it.
Easiest solution is to zip or tar the file and have that be the downloadable file.
<a href='skypebot.zip' target='_blank'>download</a>