bradleyg / django-s3direct

Directly upload files to S3 compatible services with Django.
MIT License
661 stars 234 forks source link

media files not accessible after added the AWS_S3_ENDPOINT_URL #221

Open tagnev opened 3 years ago

tagnev commented 3 years ago

Hi,

After added the AWS_S3_ENDPOINT_URL into setting.py file, I am unable to access the MEDIA files. Below are AWS settings in settings.py file AWS_S3_CUSTOM_DOMAIN = config('AWS_S3_CUSTOM_DOMAIN') AWS_ACCESS_KEY_ID = config('AWS_ACCESS_KEY_ID') AWS_SECRET_ACCESS_KEY = config('AWS_SECRET_ACCESS_KEY') AWS_STORAGE_BUCKET_NAME = config('AWS_STORAGE_BUCKET_NAME') AWS_UPLOAD_GROUP = config('AWS_UPLOAD_GROUP') AWS_DEFAULT_ACL = 'public-read' AWS_S3_REGION_NAME = config('AWS_S3_REGION_NAME') # change to your region AWS_S3_SIGNATURE_VERSION = 's3v4' S3_BUCKET_NAME = AWS_STORAGE_BUCKET_NAME AWS_QUERYSTRING_AUTH = False AWS_S3_ENDPOINT_URL = config('AWS_CLOUDFRONT_URL') DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'

As soon as i have enabled the AWS_S3_ENDPOINT_URL then MEDIA its started breaking. Could you please confirm whether its right settings?