File upload to digitalocean space not working on strapi

System Information
  • Strapi Version: 3.6.8
  • Operating System: MacOS
  • Database: mysql
  • Node Version: 14.16.1
  • NPM Version: 6.14.12
  • Yarn Version:

Hi,

I’m new to strapi and I recently deployed a strapi app to digitalocean. I followed the instructions in the documentation and everything works fine except I can’t upload images.

I already installed the package below, according to the instructions in the documentation
https://www.npmjs.com/package/strapi-provider-upload-do

Whenever I try to upload a file, I get a 500 internal server error (accesskeyId is null) and I’m positive the access key and other info are in my .env file. Please see the complete log below.

 error InvalidAccessKeyId: null
    at Request.extractError (/Users/onemole/Desktop/onemole/personal/gigs/active/nba/nba-strapi/node_modules/aws-sdk/lib/services/s3.js:585:35)
    at Request.callListeners (/Users/onemole/Desktop/onemole/personal/gigs/active/nba/nba-strapi/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
    at Request.emit (/Users/onemole/Desktop/onemole/personal/gigs/active/nba/nba-strapi/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
    at Request.emit (/Users/onemole/Desktop/onemole/personal/gigs/active/nba/nba-strapi/node_modules/aws-sdk/lib/request.js:683:14)
    at Request.transition (/Users/onemole/Desktop/onemole/personal/gigs/active/nba/nba-strapi/node_modules/aws-sdk/lib/request.js:22:10)
    at AcceptorStateMachine.runTo (/Users/onemole/Desktop/onemole/personal/gigs/active/nba/nba-strapi/node_modules/aws-sdk/lib/state_machine.js:14:12)
    at /Users/onemole/Desktop/onemole/personal/gigs/active/nba/nba-strapi/node_modules/aws-sdk/lib/state_machine.js:26:10
    at Request.<anonymous> (/Users/onemole/Desktop/onemole/personal/gigs/active/nba/nba-strapi/node_modules/aws-sdk/lib/request.js:38:9)
    at Request.<anonymous> (/Users/onemole/Desktop/onemole/personal/gigs/active/nba/nba-strapi/node_modules/aws-sdk/lib/request.js:685:12)
    at Request.callListeners (/Users/onemole/Desktop/onemole/personal/gigs/active/nba/nba-strapi/node_modules/aws-sdk/lib/sequential_executor.js:116:18)
    at Request.emit (/Users/onemole/Desktop/onemole/personal/gigs/active/nba/nba-strapi/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
    at Request.emit (/Users/onemole/Desktop/onemole/personal/gigs/active/nba/nba-strapi/node_modules/aws-sdk/lib/request.js:683:14)
    at Request.transition (/Users/onemole/Desktop/onemole/personal/gigs/active/nba/nba-strapi/node_modules/aws-sdk/lib/request.js:22:10)
    at AcceptorStateMachine.runTo (/Users/onemole/Desktop/onemole/personal/gigs/active/nba/nba-strapi/node_modules/aws-sdk/lib/state_machine.js:14:12)
    at /Users/onemole/Desktop/onemole/personal/gigs/active/nba/nba-strapi/node_modules/aws-sdk/lib/state_machine.js:26:10
    at Request.<anonymous> (/Users/onemole/Desktop/onemole/personal/gigs/active/nba/nba-strapi/node_modules/aws-sdk/lib/request.js:38:9)
[2021-11-14T02:36:04.152Z] error Error: Internal Server Error
    at convertToStrapiError (/Users/onemole/Desktop/onemole/personal/gigs/active/nba/nba-strapi/node_modules/strapi-plugin-upload/errors.js:38:26)
    at Object.upload (/Users/onemole/Desktop/onemole/personal/gigs/active/nba/nba-strapi/node_modules/strapi-plugin-upload/config/functions/bootstrap.js:35:11)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async Object.uploadFileAndPersist (/Users/onemole/Desktop/onemole/personal/gigs/active/nba/nba-strapi/node_modules/strapi-plugin-upload/services/Upload.js:154:5)
    at async Promise.all (index 0)
    at async Object.upload (/Users/onemole/Desktop/onemole/personal/gigs/active/nba/nba-strapi/node_modules/strapi-plugin-upload/services/Upload.js:140:12)
    at async uploadFiles (/Users/onemole/Desktop/onemole/personal/gigs/active/nba/nba-strapi/node_modules/strapi-plugin-upload/controllers/upload/admin.js:187:27)
    at async Object.upload (/Users/onemole/Desktop/onemole/personal/gigs/active/nba/nba-strapi/node_modules/strapi-plugin-upload/controllers/Upload.js:65:5)
    at async /Users/onemole/Desktop/onemole/personal/gigs/active/nba/nba-strapi/node_modules/strapi/lib/middlewares/router/utils/routerChecker.js:79:22
    at async /Users/onemole/Desktop/onemole/personal/gigs/active/nba/nba-strapi/node_modules/strapi/node_modules/strapi-utils/lib/policy.js:68:5
    at async /Users/onemole/Desktop/onemole/personal/gigs/active/nba/nba-strapi/node_modules/strapi/lib/middlewares/parser/index.js:48:23
    at async /Users/onemole/Desktop/onemole/personal/gigs/active/nba/nba-strapi/node_modules/strapi/lib/middlewares/xss/index.js:26:9