3

I have generated a CSV file using Javascript. When the user clicks a link, the CSV file has to be downloaded to his PC with a proper filename.

I am using HTML5 'Download' attribute in tag to provide the filename, but Safari does not acknowledge this as it has not implemented the 'Download' feature yet. This results in the download filename to be named as 'Unknown'.

Is there any other way to generate a download while retaining the filename?

2

1 Answer 1

1

I completed a quick research - I looks like Safari does not supports what you are looking to accomplish.

The reason behind why your answer works in Chrome (and Firefox) is that they bolster the download property - Safari doesn't yet. Safari 10.1+ supports "download" attribute

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.