'Upload file from html when block public access is true

I am using django-s3direct to file upload

https://github.com/bradleyg/django-s3direct

Using IAM role setting because I upload the file from the server on ECS container.

Now I set the blockPublicAccess of S3 false.

When uploading images from html, there comes error.

https://s3.ap-northeast-1.amazonaws.com/static-resource-v/images/c64d6e593de44aa5b10dcf1766582547/_origin.jpg?uploads (403 (Forbidden)
)

initiate error: static-resource-v/line-assets/images/c64d6e593de44aa5b10dcf1766582547/_origin.jpg AWS Code: AccessDenied, Message:Access Deniedstatus:403

OK, it is understandable.

Browser try to access the for initiation.

However there is any way to upload file from browser when blockPublicAccess is true??



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source