From fe19dfe96ae9f7c1b2a4beaba3bb3e986b4402f9 Mon Sep 17 00:00:00 2001 From: omer Date: Fri, 22 Feb 2019 19:51:26 +0300 Subject: [PATCH] is_secure parameter added to connect s3for.me s3for.me needs is_secure=false to connect their S3 compatible cloud. --- django_boto/s3/storage.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/django_boto/s3/storage.py b/django_boto/s3/storage.py index 96038c6..7701b6a 100755 --- a/django_boto/s3/storage.py +++ b/django_boto/s3/storage.py @@ -30,7 +30,7 @@ class S3Storage(Storage): """ def __init__(self, bucket_name=None, key=None, secret=None, location=None, - host=None, policy=None, replace=True, force_http_url=False): + host=None, policy=None, replace=True, force_http_url=False, is_secure = False): self.bucket_name = bucket_name if bucket_name else settings.BOTO_S3_BUCKET self.key = key if key else settings.AWS_ACCESS_KEY_ID @@ -40,7 +40,7 @@ def __init__(self, bucket_name=None, key=None, secret=None, location=None, self.policy = policy if policy else settings.AWS_ACL_POLICY self.force_http = force_http_url if force_http_url else settings.AWS_S3_FORCE_HTTP_URL self.replace = replace - + self.is_secure = is_secure if hasattr(Location, self.location): self.location = getattr(Location, self.location) @@ -52,7 +52,7 @@ def bucket(self): self.s3 = connect_s3( aws_access_key_id=self.key, aws_secret_access_key=self.secret, - host=self.host) + host=self.host, is_secure = self.is_secure) try: self._bucket = self.s3.create_bucket( self.bucket_name, location=self.location, policy=self.policy)