Set file name and format if file or file location contains neither

Viewed 873

I'd like to set the file name and format of a "non-typical file", for a lack of better words. The files are stored at locations such as the following...

let link = https://.../videoplayback?ipbits=0&initcwndb...D134213BA9465CB74DFD36CDE47BF.102638C4A9F3ACA357F79EE747DD5F49F1E0F0DE

When one downloads such files, even if they are completely different files, they always end up being saved with the same name and never a file extension.

I've tried url.download = link + '.mp4', but this has no effect whatsoever.

How can I do this?

3 Answers
Related