I’m very new to Strapi, and just started to play with it. Been following the official docs to install and configure the system, and while the base setup went without hiccups, getting something like the uploads provider strapi-provider-upload-aws-s3 - npm has proved to be a very different story.
For one the AWS provider documentation suggests using a JS config file located at ./config/plugins.js
. When attempting that, the server tries to restart but crashes and cannot be restarted.
I’ve also noticed my install has all config files as .json, isolated per environment, while all the documentation I can find on the site only mentions .js files for all the configuration needs. Perhaps this is related to the fact I’m running the beta, but that was what the default installer gave me, I didn’t opt for a beta version.
I’ve tried converting the suggested configuration file from the provider plugin, placing the following at config/development/plugins.json
:
{
"upload": {
"provider": "aws-s3",
"providerOptions": {
"accessKeyId": "${process.env.AWS_ACCESS_KEY_ID}",
"secretAccessKey": "${process.env.AWS_ACCESS_SECRET}",
"region": "${process.env.AWS_REGION}",
"params": {
"Bucket": "${process.env.AWS_BUCKET_NAME}"
}
}
}
}
This was accompanied with a new .env
file I’ve added to the root of the project with the required environment variables.
Still, when I go to the Upload plugin settings, I only get the default “Local server” and a blank option for possible choices: CleanShot 2021-11-19 at 13.32.07
Any tips on how I can get this to work?
Also, why all the docs I can find use .js
configuration files, whereas my install seems to only accept .json
files?
Thanks so much for any help you can provide.
System Information
- Strapi Version: v.3.0.0-beta.18.4
- Operating System: macOS 12.0.1
- Database: Postgres
- Node Version: 14.17.1
- NPM Version: 8.1.0
- Yarn Version: 1.22.17