uploading asset to strapi with cloudinary gives error : ENOTEMPTY: directory not empty

Viewed 240

I was following this tutorial to create a web app that uses Cloudinary as a image host , I followed all the steps mentioned in it but when i try to add a image it gives me this error ErrorImage , idk what's causing this , is this some kind of connection error ?

here is my plugins.js

module.exports = ({ env }) => ({

upload: {
    config:{
    provider: 'cloudinary',
    providerOptions: {
        cloud_name: env('+++++++'),
        api_key: env('8+++++++++++'),
        api_secret: env('1T++++++++++++U'),
      
    },
},

my .env file , this file also contains other stuff like jwt keys , host , port etc , here is what i added to it

--hosts ports etc--
CLOUDINARY_NAME = **********
CLOUDINARY_KEY = ***********
CLOUDINARY_SECRET = ***************

my middleware.js file

module.exports = [
  'strapi::errors',
  {
    name: 'strapi::security',
    config: {
      contentSecurityPolicy: {
        useDefaults: true,
        directives: {
          'connect-src': ["'self'", 'https:'],
          'img-src': ["'self'", 'data:', 'blob:', 'res.cloudinary.com'],
          'media-src': ["'self'", 'data:', 'blob:', 'res.cloudinary.com'],
          upgradeInsecureRequests: null,
        },
      },
    },
  },
  'strapi::cors',
  'strapi::poweredBy',
  'strapi::logger',
  'strapi::query',
  'strapi::body',
  'strapi::session',
  'strapi::favicon',
  'strapi::public',
];
0 Answers
Related