Reputation: 2344
I set up a new install of strapi with postgres as the db and am now trying to hook an s3 bucket for file uploads for when I deploy to heroku.
Am I missing something? Why am I not seeing a Files Upload
option in my UI? (Screenshot below was taken from https://medium.com/@tamirp/strapi-%EF%B8%8Fmlab-%EF%B8%8Fheroku-%EF%B8%8F-s3-step-by-step-deployment-for-a-non-developer-1cae3ec3dfe0 tutorial regarding the part about adding your credentials to strapi and the version for that tutorial says 3.0.0)
I ran npm i strapi-provider-upload-aws-s3
but I can't even get to the part where you select that after you install it.
package.json
{
"name": "backend",
"private": true,
"version": "0.1.0",
"description": "A Strapi application",
"scripts": {
"develop": "strapi develop",
"start": "strapi start",
"build": "strapi build",
"strapi": "strapi"
},
"devDependencies": {},
"dependencies": {
"knex": "<0.20.0",
"pg": "^8.3.0",
"strapi": "3.0.6",
"strapi-admin": "3.0.6",
"strapi-connector-bookshelf": "3.0.6",
"strapi-plugin-content-manager": "3.0.6",
"strapi-plugin-content-type-builder": "3.0.6",
"strapi-plugin-email": "3.0.6",
"strapi-plugin-upload": "^3.0.6",
"strapi-plugin-users-permissions": "3.0.6",
"strapi-provider-upload-aws-s3": "^3.0.6",
"strapi-utils": "3.0.6"
},
"author": {
"name": "A Strapi developer"
},
"strapi": {
"uuid": "471592c9-a46f-4c41-b503-664f047e482b"
},
"engines": {
"node": ">=10.0.0",
"npm": ">=6.0.0"
},
"license": "MIT"
}
Upvotes: 1
Views: 1287
Reputation: 2344
So the instructions are not 100% clear in my opinion but if you just manually create /extensions/upload/config/settings.json
file/folders with your correct S3 bucket information and restart your server.
Then when you upload a file to the strapi media library it will automatically upload it to your s3 bucket! Cool!
{
"provider": "aws-s3",
"providerOptions": {
"accessKeyId": "dev-key",
"secretAccessKey": "dev-secret",
"region": "aws-region",
"params": {
"Bucket": "my-bucket"
}
}
}
Upvotes: 3