Strapi doesnt upload to cloudinary

System Information
  • Strapi Version: 4.0.0
  • Operating System: windows 10 (and heroku)
  • Database: posgressql 14
  • Node Version: v14.15.3
  • NPM Version: 6.14.9
  • Yarn Version:

Hi there, This is my second time using strapi and I want to upload media files to cloudinary but strapi doesnt throw any errors and uploads to local disk insted. I have done the same as my first time using strapi which worked with cloudinary but now it just refuses to work.
config/plugins.js

module.exports = ({ env }) => ({
  // ...
  upload: {
    config: {
      provider: 'cloudinary',
      providerOptions: {
        cloud_name: env('CLOUDINARY_NAME'),
        api_key: env('CLOUDINARY_KEY'),
        api_secret: env('CLOUDINARY_SECRET'),
        default_folder: env('CLOUDINARY_DEFAULT_FOLDER'),
      },
      actionOptions: {
        upload: {},
        delete: {},
      },
    },
  },
  // ...
});

config/middleware.js

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::favicon',
    'strapi::public',
  ];