i want to download .pdf file from direktori /assets/images/myfile.pdf in my sites direktori. and try it using download link but id didnt work then my browser not responding and i have to kill the sites connection, i'm using Chrome. How can i fix this? here's my code
<a href="/assets/images/myfile.pdf" download="myfile"></a>
答案 0 :(得分:1)
如果您的网站网址example.com
然后使用此代码。它经过测试,用于测试
将网址放入浏览器http://example.com/assets/images/myfile.pdf,使用您的网站网址替换example.com
<a href="http://example.com/assets/images/myfile.pdf" download="myfile">Download</a>
如果网站网址为http://stackoverflow.com,请使用此替换它,并在此位置输入您的myfile退出网址。
希望它能运作