Upload media to digitalocean spaces using strapi v4

Hi @Tal_Shemer,

I’m using the strapi-provider-upload-do and it works just fine.

Here’s my config (under ./config/env/production/plugins.js):

module.exports = ({ env }) => ({
  // ...
  upload: {
    config: {
      provider: "strapi-provider-upload-do",
      providerOptions: {
        key: process.env.DO_SPACE_ACCESS_KEY,
        secret: process.env.DO_SPACE_SECRET_KEY,
        endpoint: process.env.DO_SPACE_ENDPOINT,
        space: process.env.DO_SPACE_BUCKET,
        directory: "media", // optional
      },
    },
  },
  // ...
});

I had to change the provider value from the short term to the actual package name, there’s a note in the docs about that.

Hope this helps. Reach out if I should clarify.

2 Likes