i want to show uploaded images on my html page with returned/made url. but i am getting access denied on that url. I am new to aws s3 how can i fix it. I want ot access it in both(App and web with that url)
Asked
Active
Viewed 490 times
-1
-
1We need some _code_ to find the issue. – Pedram Parsian Dec 03 '19 at 12:04
-
try it https://stackoverflow.com/questions/53328695/how-to-display-media-files-stored-in-amazon-s3-in-django-template – DEEPAK KUMAR Dec 03 '19 at 12:27
-
hey I think i have got yhe solution: s3.ObjectAcl(AWS_STORAGE_BUCKET_NAME,'%s/%s' %(AWS_BLOG_IMAGES_FOLDER,file.name)).put(ACL='public-read') – Ashish Dec 08 '19 at 08:40
1 Answers
1
This issue occurs because of the bucket permission. Looks like your bucket is not public that's why you're getting access denied issue when calling from the webpage. One thing you could do which is secure as well (instead of making your bucket public) is that to upload those images with pre-signed URLs. You can learn more about pre-signed URLs on AWS page here. Hope this helps.
Also, you need to give more information in your question to get more precise answers.

disp_name
- 1,448
- 2
- 20
- 46