Cody Anderson
Cody Anderson

Reputation: 124

<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?

Upvotes: 0

Views: 887

Answers (1)

Alex Howes
Alex Howes

Reputation: 454

Browsers don't allow the use of the download attribute to rename a file when the file is from an external server/domain.

Upvotes: 3

Related Questions