Created
March 31, 2017 14:06
-
-
Save teehamaral/7610b773e6d727e38ba92d72fb19e41c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import boto3 | |
| s3 = boto3.client('s3', | |
| aws_access_key_id=settings.AWS_ACCESS_KEY_ID, | |
| aws_secret_access_key=settings.AWS_SECRET_ACCESS_KEY | |
| ) | |
| url = s3.generate_presigned_url( | |
| 'get_object', | |
| Params={'Bucket': default_storage.bucket.name, 'Key': default_storage._encode_name(path)}, | |
| ExpiresIn=3600, | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment