我正在尝试将所有 Django 媒体文件(从管理面板上传)上传到 Amazon S3。所以设置文件看起来像这样:
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'tastypie',
'core',
'advertisment',
'storages',
)
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
AWS_ACCESS_KEY_ID = 'xxx'
AWS_SECRET_ACCESS_KEY = 'xxx'
AWS_STORAGE_BUCKET_NAME = 'media'
MEDIA_URL = 'https://s3.amazonaws.com/%s/' % AWS_STORAGE_BUCKET_NAME
当我尝试从管理面板上传文件时,出现以下错误:
S3ResponseError: 403 Forbidden
我检查了这个答案,但仍然没有帮助