Skip to content

Commit

Permalink
Rename url_expires_in to expires_in
Browse files Browse the repository at this point in the history
  • Loading branch information
taion committed Sep 26, 2016
1 parent d132776 commit 756d181
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions flask_annex/s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

# -----------------------------------------------------------------------------

DEFAULT_URL_EXPIRES_IN = 300
DEFAULT_EXPIRES_IN = 300

# -----------------------------------------------------------------------------

Expand All @@ -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',
Expand All @@ -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)
Expand Down Expand Up @@ -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)

Expand All @@ -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 {
Expand Down

0 comments on commit 756d181

Please sign in to comment.