Reduce directory nesting
continuous-integration/drone Build is failing Details

This commit is contained in:
Lauri Võsandi 2023-09-15 01:24:29 +03:00
parent eb9961c77f
commit f6d14671f5
1 changed files with 1 additions and 1 deletions

View File

@ -141,7 +141,7 @@ async def upload(bucket, blob: bytes, thumb: bytes, event_id):
# Generate S3 path based on the JPEG blob SHA512 digest
fp = hashlib.sha512(blob).hexdigest()
path = "%s/%s/%s/%s.jpg" % (fp[:4], fp[4:8], fp[8:12], fp[12:])
path = "%s/%s.jpg" % (fp[:4], fp[4:])
try:
await bucket.upload_fileobj(io.BytesIO(thumb), "thumb/%s" % path)