Downloading file from R2 but unsure what the best method is.

Hey there, newbie here. Ive read several cloudflare docs on how to give users temporary access to a file using signed urls, however i want that the url is only accessible once and not for a short period.
The other method would be by using these
object.httpEtag
attributes but i really dont know how i can use etags in my application, all i could find about etags is that browsers store these tags to either use the file from the cache or download it again, but i dont need any cache at all, i always want to download the file no matter what (i understood the concept of etags, but dont need it, i want to download the file always).
My last idea would be to just get the file data within my worker and then just pass the data back in the response, but this kills the cpu time and isnt quite good as a free user.

Any idea or examples of a simple eimplementation to fix my issue? I dont wanna rely on any ai prompts but didnt find many resources online (probaby missed some good resources). A one time use link would be perfect.
Was this page helpful?