Closed marcosCapistrano closed 2 years ago
@marcosCapistrano Thanks for reporting. I will run 5-begin and see if I can reproduce the error.
@marcosCapistrano I ran the 5-begin
code and did not see that data
in that line of code is undefined.
To confirm that data
is not undefined here, I went to the aws-s3.ts
file of 5-begin
and added console.log(data)
like so:
I started the app, went to Your Settings
page and uploaded a new avatar. After that, my server logs print data
object:
Please check up set up for your AWS S3 bucket. Under Permissions
, make sure you deselected Block all public access
:
Also under Permissions
, make sure your CORS policy is correct:
Finally, check that you have all necessary environmental variables saved in your appropriate .env
files (both app
and api
).
Let me know if you still have trouble. Feel free to create a public repo with your code, and I will test.
Oh i must have done something wrong, i'll try it as soon as I can, Thanks!!
Hi @marcosCapistrano - were you able to figure out the issue? Let me know if you still have trouble.
Not sure if im doing something wrong, tried it a bunch of times and it keeps returning undefined here:
return new Promise((resolve, reject) => { s3.getSignedUrl('putObject', params, (err, data) => { const parsedUrl = url.parse(data); <<<<<<<<<<< HERE "data" is undefined
});
Files from 5-begin can be used for testing