<a> download rename not working

时间:2015-10-13 21:47:28

标签: html html5

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?

1 个答案:

答案 0 :(得分:3)

当文件来自外部服务器/域时,浏览器不允许使用download属性重命名文件。