I currently have a website hosted on AWS that accepts api calls of the form https:///download//filename. The is a short-lived token used to authenticate the user. If the token validates, the filename is downloaded from the website. The website itself is nginx with a django backend and the file is served via a nginx X-ACCEL-REDIRECT.
I am trying to assess whether storing the files in a R2 storage would help with our download speeds across the world. Is it possible to do a redirect to the address of the file on the R2 storage? Or do I need something else like a worker in front of the storage? And how do I prevent the file from being served if the redirect address is visible – clearly I want it only served once my website does the redirect.
Any templates for doing this? I have been looking through the community postings but don’t see anything that gives me a good starting point.
Thanks. And Happy New Year to all