I am exporting fields in a database to a .csv file on an enterprise server, then creating a link to download the file in a browser. When you click the link, the .csv file will download using Chrome but Safari will only display it.
The code for the link is: LLink={<a href="http://IP Number/}+LLinkName+{.csv" download="ListName">download now</a>}
LLink is a variable that contains the name of the file on the server.
Thanks James. For some reason my code didnât come through correctly as I didnât realize that it converted my link code to a link instead of displaying the code.
I am using the download attribute. There are no spaces in the file name. I donât think your code would work without bracketing. At least it didnât for me until I bracketed it. As I said, it works perfectly in Chrome, just not Safari. Iâll try tp post the code again assuming I would have <a and the closing a on both ends inside the brackets:
Obviously I donât know how to display code properly on this forum. When I put the a tag in the code, it produced the result instead of displaying the code. How did you write your code? Thanks.
The easiest way to protect the code as written is to use the Preformatted text tool in the editor. Highlight the code text you enter or paste and then click the tool.
If I use your code above in a procedure like this(the ip number is illustrative): LLink=<a download href="http://192.168.1.1/%7D+LLinkName+%7B.csv">download now</a>
Panorama responds with âOperand expected but not foundâ. If I enclose the code in any way (eg:pipes), Panorama likes the procedure but both browsers through the error âThe requested URL /}+LLinkName+{.csv was not found on this server.â.
Thanks to Gary, you can see the code that works in my original post now, however, it only works in Chrome.
Ok, I found another page on W3 schools that says it isnât supported. I canât tell which one was the latest post but I know it doesnât work with Safari.
At this point, Iâm just going to ask my client to use Chrome for this task.
CanIUse is a very popular site for determining what features work with what browser. This search leads me to believe that the download feature is supposed to work in Safari since version 10.1 in March 2017.
That page led me to an official webkit support page that also indicates that it is supposed to work.