Hi, I am trying to use my own AWS S3 bucket for storing images and videos posted by users but I am not sure how the logic should work with this.
I manage to upload images with a presigned URL to my own bucket. I assume that I have to store the data path with my bucket URL. I just generated a random nr that I stored in bubble database with the added general part of the bucket URL in front of it. Maybe there’s a better flow to store these URLs?
As long as you have the bucket name, region and path/filename.ext, you may reconstruct the AWS S3 URL such as
https://bucket-name.s3.Region.amazonaws.com/key-name, so there is no requirement to store it in your database, even though you may.
Of course those are static URLs, so to use them, either:
- your bucket is configured to allow object downloading (GET method) from anybody.
- or you have used the Set File Public Access action on the object to allow downloading for that object.
Please note that those URLs can be automatically generated as output value by all actions of the said plugin having “Generate URLs” options.
Feel free to DM me if more guidance is required