Advertisement
Guest User

Untitled

a guest
Aug 25th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. def get_presigned_url():
  2. s3 = boto3.client('s3')
  3. bucket = "your-s3-bucket-name"
  4.  
  5. return s3.generate_presigned_post(
  6. Bucket=bucket,
  7. Key="media/screenshots/login.png",
  8. Fields={"acl": "public-read", "Content-Type": "png"},
  9. Conditions=[
  10. {"acl": "public-read"},
  11. {"Content-Type": "png"}
  12. ],
  13. ExpiresIn=3600
  14. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement