From 756d18183328912eba7641b5b997b832832d668f Mon Sep 17 00:00:00 2001 From: Jimmy Jia Date: Mon, 26 Sep 2016 18:46:29 -0400 Subject: [PATCH] Rename url_expires_in to expires_in --- flask_annex/s3.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/flask_annex/s3.py b/flask_annex/s3.py index bbb8b1e..160b8f1 100644 --- a/flask_annex/s3.py +++ b/flask_annex/s3.py @@ -8,7 +8,7 @@ # ----------------------------------------------------------------------------- -DEFAULT_URL_EXPIRES_IN = 300 +DEFAULT_EXPIRES_IN = 300 # ----------------------------------------------------------------------------- @@ -20,7 +20,7 @@ def __init__( region=None, access_key_id=None, secret_access_key=None, - url_expires_in=DEFAULT_URL_EXPIRES_IN, + expires_in=DEFAULT_EXPIRES_IN, ): self._client = boto3.client( 's3', @@ -30,7 +30,7 @@ def __init__( ) self._bucket_name = bucket_name - self._url_expires_in = url_expires_in + self._expires_in = expires_in def delete(self, key): self._client.delete_object(Bucket=self._bucket_name, Key=key) @@ -82,7 +82,7 @@ def send_file(self, key): 'Bucket': self._bucket_name, 'Key': key, }, - ExpiresIn=self._url_expires_in, + ExpiresIn=self._expires_in, ) return flask.redirect(url) @@ -109,7 +109,7 @@ def get_upload_info(self, key): Key=key, Fields=fields, Conditions=conditions, - ExpiresIn=self._url_expires_in, + ExpiresIn=self._expires_in, ) return {