beer-inder / Assignment1_7427

0 stars 0 forks source link

Site giving error while uploading image using AWS S3 #16

Closed beer-inder closed 4 years ago

beer-inder commented 4 years ago

After successfully deploying the app on heroku, trying to upload image using AWS S3, but its giving error. Screenshot for the issue is attached. AWS_S3_Heroku_Image_upload_Issue

beer-inder commented 4 years ago

Solution: On Heroku CLI, config var need to be set for AWS_SECRET_KEY and AWS_SECRET_ACCESS_KEY,

heroku config:set AWS_ACCESS_KEY_ID='AKILA36G4XXTE' heroku config:set AWS_SECRET_ACCESS_KEY='5f4Na3J9HJwyV2jlf8PrQBqk0lhHhb'

Problem with above commad is value for vars should not be in quotes, it should be

heroku config:set AWS_ACCESS_KEY_ID=AKILA36G4XXTE heroku config:set AWS_SECRET_ACCESS_KEY=5f4Na3J9HJwyV2jlf8PrQBqk0lhHhb