Ian Lewis committed 890ed22

Added support for passing querystring auth and expire parameters to the constructor for S3BotoStorage

Comments (0)

Files changed (1)


     def __init__(self, bucket=STORAGE_BUCKET_NAME, access_key=None,
                        secret_key=None, acl=DEFAULT_ACL, headers=HEADERS,
-                       gzip=IS_GZIPPED, gzip_content_types=GZIP_CONTENT_TYPES):
+                       gzip=IS_GZIPPED, gzip_content_types=GZIP_CONTENT_TYPES,
+                       querystring_auth=QUERYSTRING_AUTH, querystring_expire=QUERYSTRING_EXPIRE):
         self.acl = acl
         self.headers = headers
         self.gzip = gzip
         self.gzip_content_types = gzip_content_types
+        self.querystring_auth = querystring_auth
+        self.querystring_expire = querystring_expire
         if not access_key and not secret_key:
              access_key, secret_key = self._get_access_keys()
     def url(self, name):
         name = self._clean_name(name)
-        return self.connection.generate_url(QUERYSTRING_EXPIRE, method='GET', \
-      , key=name, query_auth=QUERYSTRING_AUTH)
+        return self.connection.generate_url(self.querystring_expire, method='GET', \
+      , key=name, query_auth=self.querystring_auth)
     def get_available_name(self, name):
         """ Overwrite existing file with the same name. """
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.