From f6d14671f5c45e176f681c021fa15c5d1b0ee926 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauri=20V=C3=B5sandi?= Date: Fri, 15 Sep 2023 01:24:29 +0300 Subject: [PATCH] Reduce directory nesting --- camdetect.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/camdetect.py b/camdetect.py index 08436a8..1865b10 100755 --- a/camdetect.py +++ b/camdetect.py @@ -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)