Hi, I’m trying to allow my video render files to be force-downloaded via a single click within my app.
I tried using the download attribute with < a > tags using the render URL from ShotStack’s CDN. There are two issues, however:
- It appears that in order to allow force downloading, the metadata needs to be edited for the file in the S3 bucket. It must be changed to Key = “Content-Disposition” and Value = “attachment”.
I tested this out with my own S3 bucket as opposed to SS’s CDN, and it was successful.
< a href=“https://MyBucket/my_file_url.mp4” target="_blank" >Download
The solution I found is described here: Amazon S3 - Overview - Easy Digital Downloads
- Unfortunately, the method above does not allow for renaming of the download files due to browser security reasons.
For example, < a href=“My_URL” download=“My New File Name”> only works for same origin URLs.
This leaves me (I think), with the option of hosting my own render files temporarily within my own S3 bucket, and changing the file names from there.
I do not want to opt out of SS’s CDN hosting completely.
Can you please help me ideate another solution?