Using Django-Storages with amazon S3 and https
Asked Answered
A

1

9

We have an image uploader that uploads to AWS, using django-storages. Right now it sends images over http but we want it to use https.

Googling didn't help me find a way to configure django-storages to do it. Does anyone know the best way to accomplish this, or any documentation that would point me in the right direction.

Anytime answered 28/7, 2011 at 23:14 Comment(0)
I
20

Looking at the source it appears you can enable HTTPS by setting AWS_S3_SECURE_URLS = True.

Illness answered 29/7, 2011 at 0:5 Comment(2)
is there a clean method to switch it based on requested protocol?Omega
@Omega from boto.s3.connection import ProtocolIndependentOrdinaryCallingFormat AWS_S3_CALLING_FORMAT = ProtocolIndependentOrdinaryCallingFormat()Wilkinson

© 2022 - 2025 — McMap. All rights reserved.