search

Home  >  Q&A  >  body text

Can cross-domain download files with a tag be renamed?

Can cross-domain download files with a tag be automatically renamed when clicking download?
The file is not on my server
I don’t want to save this file on my server
Is there a way for users to automatically rename the file name when downloading by clicking on the a tag?

phpcn_u153phpcn_u1532784 days ago1870

reply all(2)I'll reply

  • 大家讲道理

    大家讲道理2017-05-23 09:28:48

    Currently only Chrome supports this feature:

    <a href="..." download="file.mp4">Download</a>


    reply
    0
  • 大家讲道理

    大家讲道理2017-05-23 09:27:41

    You can use the download attribute in HTML5:

    <a href="https://www.baidu.com/img/bd_logo1.png" download="baidu">


    reply
    0
  • Cancelreply