This provider will upload to the space using the AWS S3 API.
fra.digitaloceanspaces.com
)/example
)cdn.example.com
)npm i strapi-provider-upload-do
yarn add strapi-provider-upload-do
pnpm add strapi-provider-upload-do
./config/plugins.js
with contentmodule.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'),
}
},
},
// ...
})
.env
and add provide Digital Ocean config.DO_SPACE_ACCESS_KEY=
DO_SPACE_SECRET_KEY=
DO_SPACE_ENDPOINT=
DO_SPACE_BUCKET=
DO_SPACE_DIRECTORY=
DO_SPACE_CDN=
with values obtained from tutorial:
https://www.digitalocean.com/community/tutorials/how-to-create-a-digitalocean-space-and-api-key
Parameter DO_SPACE_DIRECTORY
and DO_SPACE_CDN
is optional and you can ommit them both in .env
and settings
.