Hello to all,
I am writing this topic because I did not find a solution after an afternoon of work.
I have followed to the letter:
https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/heroku.html#file-uploads
And I succeeded in putting everything in production, and functional on my Heroku, but an error remains about Cloudinary after having followed this tutorial to the letter:
https://market.strapi.io/providers/@strapi-provider-upload-cloudinary
In local, the upload works, I can upload my images without any problem, and my Cloudinary receives everything well, in production, it is impossible:
My plugins.js file :
upload: {
config: {
provider : 'cloudinary',
providerOptions : {
cloud_name : env('CLOUDINARY_NAME'),
api_key : env('CLOUDINARY_KEY'),
api_secret : env('CLOUDINARY_SECRET'),
},
actionOptions : {
upload: {},
uploadStream : {},
delete: {},
},
},
},
My middlewares.js file :
module.exports = [
'strapi::errors',
{
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,
},
},
},
},
'strapi::cors',
'strapi::poweredBy',
'strapi::logger',
'strapi::query',
'strapi::body',
'strapi::session',
'strapi::favicon',
'strapi::public',
];
Of course, the expected variables are filled in on the .env file.
- Is it a Strapi problem, a security issue? an incompatibility? an outdated plugin?
- Is it a problem I need to see directly with Heroku? or Cloudinary?
Thank you for taking the time to answer me