I'm trying to upload images to Digital Ocean Spaces from the Strapi admin panel to persist the media over the server restart but after sveral hours of debugging I still can't find a reason why the images are not uploading to the database.
This is my .env file:
DO_SPACE_ACCESS_KEY=access-key-from-spaces
DO_SPACE_SECRET_KEY=access-secret-from-spaces
DO_SPACE_ENDPOINT=ams3.digitaloceanspaces.com
DO_SPACE_BUCKET=my-bucket-name-here
DO_SPACE_DIRECTORY=/
DO_SPACE_CDN=https://my-bucket-name-here.ams3.cdn.digitaloceanspaces.com
And this is my config/plugins.js:
module.exports = ({env}) => ({
// ...
upload: {
config: {
provider: "strapi-provider-upload-do",
providerOptions: {
key: env('DO_SPACE_ACCESS_KEY'),
secret: env('DO_SPACE_SECRET_KEY'),
endpoint: env('DO_SPACE_ENDPOINT'),
space: env('DO_SPACE_BUCKET'),
directory: env('DO_SPACE_DIRECTORY'),
cdn: env('DO_SPACE_CDN'),
}
},
},
// ...
})
Whit this configuration the image uploads to strapi media library but the image won't go to Digital Ocean Spaces. Also the url for the uploaded images are like this: https://https//5ddca55609adfdd79f85c9c5c01c6c63.svg
when it should be the origin url to the image inside Spaces.
Is there something wrong with my configuration and what could I try to fix this?