Skip to content

Commit 1213fe6

Browse files
committed
Fix: 파일 업로드 불가능 이슈 수정
1 parent f5cb218 commit 1213fe6

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from storages.backends.s3boto3 import S3Boto3Storage
2+
3+
4+
class SecurityTokenWorkaroundS3Boto3Storage(S3Boto3Storage):
5+
def _get_security_token(self):
6+
return None

pyconweb2022/pyconweb2022/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@
133133
STATIC_URL = "static/"
134134

135135
# S3
136-
DEFAULT_FILE_STORAGE = "storages.backends.s3boto3.S3Boto3Storage"
136+
DEFAULT_FILE_STORAGE = "pyconweb2022.customBoto3Storage.SecurityTokenWorkaroundS3Boto3Storage"
137137
STATICFILES_STORAGE = "storages.backends.s3boto3.S3StaticStorage"
138138
AWS_S3_SESSION_PROFILE = "pycon"
139139
AWS_STORAGE_BUCKET_NAME = os.getenv("AWS_STATIC_S3_BUCKET")

0 commit comments

Comments
 (0)