- Strapi 4.5.1
- Debian 11:
- Mysql 8.0:
- 16.18.1:
- npm 9.2:
I am trying to save my media in google cloud platform buckets (also deployed in a GCP vm). I am following the docs but i am still getting error.
This is my plugins.js
module.exports = {
upload: {
config: {
provider: '@strapi-community/strapi-provider-upload-google-cloud-storage',
providerOptions: {
bucketName: 'bucketname',
publicFiles: true,
uniform: true,
baseUrl: 'https://storage.googleapis.com/bucketname',
basePath: '',
},
},
},
}
Here is my middlewares.js
module.exports = [
'strapi::errors',
{
name: 'strapi::security',
config: {
contentSecurityPolicy: {
useDefaults: true,
directives: {
'connect-src': ["'self'", 'https:'],
'img-src': ["'self'", 'data:', 'blob:', 'storage.googleapis.com'],
'media-src': ["'self'", 'data:', 'blob:', 'storage.googleapis.com'],
upgradeInsecureRequests: null,
},
},
},
},
'strapi::cors',
...
THANKS!