Julian
Julian
CDCloudflare Developers
Created by Julian on 2/20/2024 in #workers-help
Is this how you would do it? (need feedback)
I have a site which lets you view custom game maps, the important part is they can have up to ~80mb most of the time 30mb. Currently I just store them in my file system on my server. Now I want to use R2 for storage since over time I will end up running out of storage and bandwidth. I read through the docs and my plan now is to: Store all the maps inside a R2 bucket. Then when a user request a map: --> if its public no need for auth --> if its private then request from the server if the user can access (I dont mind the delay of the req since the download would take 5+ seconds in most cases) I know you can do Access control through WAF but since its just a small side project I would be happier to save the 20 €. Or would it be better to just generate a key for each object and every time the status of the map changes I regenerate the key, so the worker just needs to check if the key matches? Since the key only gets sent to users with auth it should be fine? I am just at the learning how all of this stuff works, so there is probably a better way. But I do not want to built out something that would not work from the beginning. Would caching be useful in this case? Thank you for your help! 🙂
1 replies