Apr 14, 2020
Strapi set default file upload provider to S3 / Cloudinary / Rackspace
For Strapi version 3.0.0-beta.20 onward
All you need to do is to create a file at extensions/upload/config/settings.json
Cloudinary
yarn add strapi-provider-upload-cloudinary
- Update
extensions/upload/config/settings.json
{ "provider": "cloudinary", "providerOptions": { "cloud_name": "YOUR CLOUDINARY CLOUD NAME", "api_key": "YOUR CLOUDINARY API KEY", "api_secret": "YOUR CLOUDINARY API SECRET" } }
AWS S3
- Install strapi-provider-upload-aws-s3
yarn add strapi-provider-upload-aws-s3
- Update
extensions/upload/config/settings.json
{ "provider": "aws-s3", "providerOptions": { "accessKeyId": "YOUR AWS IAM ACCESS KEY", "secretAccessKey": "YOUR AWS IAM SECRET KEY", "region": "YOUR S3 BUCKET REGION", "params": { "Bucket": "YOUR S3 BUCKET NAME" } } }
Google Cloud Storage (GCS)
yarn add strapi-provider-upload-google-cloud-storage
- Update
extensions/upload/config/settings.json
{ "provider": "google-cloud-storage", "providerOptions": { "serviceAccount": "YOUR GCS SERVICE ACCOUNT JSON", "bucketName": "YOUR GCS BUCKET NAME", "baseUrl": "https://storage.googleapis.com/YOUR GCS BUCKET NAME" } }
And that’s it! Enjoy!
Photo by Drew Coffman on Unsplash
Written by: Kwinten
Node.js, JavaScript, Cloud computing, Serverless and more