Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Django-Storages with amazon S3 and https

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.

like image 380
ahalbert Avatar asked Jul 28 '11 23:07

ahalbert


People also ask

How do I upload files to AWS S3 using Django REST framework?

Building a simple Django Rest API application Execute the commands below to set up the project. Add the code snippet below to urls.py file in the dropboxer project directory. Create serializers.py and urls.py files in the uploader app. In models.py file, we create a simple model that represents a single file.

Does S3 have SSL?

If you have an AWS account, hosting your static website in an AWS S3 bucket is a great choice. Couple that setup with AWS's content delivery network (CDN) CloudFront, and you'll have an AWS S3 Static SSL website set up in no time!


1 Answers

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

like image 114
zeekay Avatar answered Oct 05 '22 19:10

zeekay