Skip to content

Commit

Permalink
Change facedetection to submit thumbnails instead of full size photos
Browse files Browse the repository at this point in the history
  • Loading branch information
DeD1rk committed Apr 26, 2024
1 parent 1895e25 commit 9056349
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions website/facedetection/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def _serialize_lambda_source(source: ReferenceFace | FaceDetectionPhoto):
"pk": source.pk,
"token": source.token,
"photo_url": get_media_url(
source.file,
source.file.thumbnails.large,
absolute_url=True,
# Lambda calls can be queued for up to 6 hours by default, so
# we make sure the url it uses is valid for at least that long.
Expand All @@ -60,7 +60,7 @@ def _serialize_lambda_source(source: ReferenceFace | FaceDetectionPhoto):
"pk": source.pk,
"token": source.token,
"photo_url": get_media_url(
source.photo.file,
source.photo.file.thumbnails.photo_large,
absolute_url=True,
expire_seconds=60 * 60 * 7,
),
Expand Down

0 comments on commit 9056349

Please sign in to comment.