Strapi with Cloudinary upload image issue

System Information
  • Strapi Version: 4.3.6
  • Operating System: Wodnows 11
  • Database: sqlite on development mode and postgres on production
  • Node Version: 16.14.0
  • NPM Version: 8.3.1
  • Yarn Version: 1.22.15

Hey everyone :slight_smile:

I’m struggling with uploading certain image to media library inside Strapi which is configured with Cloudinary provider.
The issue is that most images are ok with uploading, but I have one image that break the whole server every time.
Once I succeeded in uploading this file but some area if picture was black so it didn’t convert it properly.
It was .jpg image, but I uploaded many jpg images earlier, and it was fine.
I have it on production. On development mode, it also throws an error in media library.

When the file was uploaded to the end, I waited small amount of time and received a red screen inside image uploader with X and error:

This is the output from console:

I also put info from render.com logs, where status of teh service is failed:

This is also info from render about what happened:
image

this is my middleware.js and plugins.js config in development mode and also in env/production file:

    name: 'strapi::security',
    config: {
      contentSecurityPolicy: {
        useDefaults: true,
        directives: {
          'connect-src': ["'self'", 'https:'],
          'img-src': ["'self'", 'data:', 'blob:', 'dl.airtable.com', 'res.cloudinary.com'],
          'media-src': ["'self'", 'data:', 'blob:', 'dl.airtable.com', 'res.cloudinary.com'],
          upgradeInsecureRequests: null,
        },
      },
    },
  },

And plugins config:

    upload: {
        config: {
            provider: 'cloudinary',
            providerOptions: {
                cloud_name: env('CLOUDINARY_NAME'),
                api_key: env('CLOUDINARY_KEY'),
                api_secret: env('CLOUDINARY_SECRET'),
            },
            actionOptions: {
                upload: {},
                uploadStream: {},
                delete: {},
            },
        },
    }

I don’t know how to customize uploading settings with Cloudinary provider, maybe it’s just all about proper config.
Someone shared with me docs about middleware config, but I’m trying to understand it to be honest.
https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.html#internal-middlewares-configuration-reference

I also want to mention that on development mode, it uploads it properly.

Appreciate anyones help :slight_smile:

Actually when ever you upload image on strapi your image is storing in your cloudinary but also in strapi that’s why you running out of space and can not upload other images. If you can look in your strapi public/uploads there will be your all images that you have uploaded.
Hope so you will get this…

Hi @konat1993 I also have the problem. I thought i had fixed it with a new strapi instance but it seems the issue still persists. I do have an instance uploaded on render