I have a page http://example.com/1.html and on it I have a link http://example.com/1.mp4
<a href="http://example.com/1.mp4">Download</a>
which redirect to another link https://example.com/videoplayback?.... which plays the .mp4 file. In order to download the file without redirect I use the download attribute
<a href="http://example.com/1.mp4" download>Download</a>
and in order to set a name to the file I set a value to the download attribute
<a href="http://example.com/1.mp4" download="S1E1.mp4">Download</a>
Now when I click the link the file should start downloading with the name S1E1.mp4 but because the link redirect to another link the file name is "videoplayback". So how can I set the name of this file to be "S1E1.mp4". Thanks for everything. If my question is not clear leave a comment and I'll edit it.