Skip to content

Commit

Permalink
Fix: Copy paste error
Browse files Browse the repository at this point in the history
  • Loading branch information
fsbraun committed Sep 25, 2023
1 parent 870dfb6 commit d926388
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions filer/admin/clipboardadmin.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,12 @@ def ajax_upload(request, folder_id=None):
res_x: int = int((FILER_MAX_IMAGE_PIXELS * aspect) ** 0.5)
res_y: int = int(res_x / aspect)
if pixels > 2 * FILER_MAX_IMAGE_PIXELS:
if pixels > 2 * FILER_MAX_IMAGE_PIXELS:
msg = _(
"Image size (%(pixels)d million pixels) exceeds limit of "
"%(max_pixels)d million pixels by a factor of two or more. Resize "
"image to %(width)d x %(height)d) resolution or lower."
) % dict(pixels=pixels / 1000000, max_pixels=FILER_MAX_IMAGE_PIXELS / 1000000,
width=res_x, height=res_y)
msg = _(
"Image size (%(pixels)d million pixels) exceeds limit of "
"%(max_pixels)d million pixels by a factor of two or more. Resize "
"image to %(width)d x %(height)d) resolution or lower."
) % dict(pixels=pixels / 1000000, max_pixels=FILER_MAX_IMAGE_PIXELS / 1000000,
width=res_x, height=res_y)
messages.error(request, msg)
return JsonResponse({'error': str(msg)})

Expand Down

0 comments on commit d926388

Please sign in to comment.