myfile.docx but I always get redirected to G">
I'm trying to create a download link the way I've been doing it before. But now it keeps redirecting me to Google Docs - I've never encountered this before and it should be a simple task, so this is quite shocking to me.
I used the HTML5 download attribute:
myfile.docx
But I always get redirected to Google Docs. I also opened the Chrome Developer Console and noticed that after I clicked on the link, it changed the href to Google Docs. I have absolutely no idea why this is happening.
The path should be fine, I can't figure out the problem. what do I do?
The download attribute only applies to same-origin URLs. So if the href is different from the site's source, it won't work. In other words, you can only download files that belong to that website. This attribute follows the same rules outlined in the Same Origin Policy