Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def post_thumb(local_file, s3_file, key):
"""
Notify photostreamer-server that a new thumbnail photo has been posted
to S3.
"""
l.debug("Notifying photostreamer-server of thumbnail photo %s", key)
tags = exif.parse(local_file)
filesize = os.path.getsize(local_file)
payload = {
"sender" : sender,
"filesize": filesize,
"fileid": key,
"thumbnail": s3_file.generate_url(expires_in=0, query_auth=False),
"exif": tags
}
success = post('/photo/thumb', payload)