Hey there!
I know that this is old, but I am having the same issue where I host the uploaded images in an S3 bucket, and use a PostgreSQL database. URLs in the upload_file table are the absolute URLs, and they contain the bucket URL as a prefix. My issue is that I want to move the images to a new bucket with a different URL. Simply changing the configuration of Strapi will only change the URL for the new uploads (Correct me on this if I am wrong), but won’t change the pre-existing images’ URLs. How do I change the existing images’ URL to be prefixed with the new bucket URL?
My current approach is:
- Move the images to a new bucket
- Configure Strapi to upload on the new bucket
- Use SQL queries to modify the
urlandformatscolumns in theupload_filetable
Is there any better way to do this?