ошибка:
Traceback (most recent call last):
File "/home/fractaluser/Desktop/Dev/carlos-fitness/heybe/backend/env/lib/python3.5/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/home/fractaluser/Desktop/Dev/carlos-fitness/heybe/backend/env/lib/python3.5/site-packages/django/core/handlers/base.py", line 115, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/home/fractaluser/Desktop/Dev/carlos-fitness/heybe/backend/env/lib/python3.5/site-packages/django/core/handlers/base.py", line 113, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/fractaluser/Desktop/Dev/carlos-fitness/heybe/backend/coach/views.py", line 122, in coach_bio
logoname = fs.save(logo.name, logo)
File "/home/fractaluser/Desktop/Dev/carlos-fitness/heybe/backend/env/lib/python3.5/site-packages/django/core/files/storage.py", line 52, in save
return self._save(name, content)
File "/home/fractaluser/Desktop/Dev/carlos-fitness/heybe/backend/env/lib/python3.5/site-packages/django/core/files/storage.py", line 242, in _save
os.makedirs(directory)
File "/home/fractaluser/Desktop/Dev/carlos-fitness/heybe/backend/env/lib/python3.5/os.py", line 231, in makedirs
makedirs(head, mode, exist_ok)
File "/home/fractaluser/Desktop/Dev/carlos-fitness/heybe/backend/env/lib/python3.5/os.py", line 241, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '//maxfitness-storage.s3.amazonaws.com'
[07/Nov/2019 18:33:49] "POST /coach/bio/ HTTP/1.1" 500 92941
Политика Bucket:
{
"Version": "2012-10-17",
"Id": "Policy1573146453795",
"Statement": [
{
"Sid": "Stmt1573146452111",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:*",
"Resource": "arn:aws:s3:::maxfitness-storage/*"
}
]
}
Конфигурация CORS:
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<MaxAgeSeconds>3000</MaxAgeSeconds>
<AllowedHeader>Authorization</AllowedHeader>
</CORSRule>
</CORSConfiguration>
Здесь я пытаюсь загрузить файл изображения в корзину AWS S3.
Но при загрузке изображения в корзину s3 я получаю сообщение об ошибке (поделился ошибкой сверху)
Я поделился своей политикой корзины и настройкой CORS: также
Пожалуйстапосмотри.