Fix error with large thumbnails

This commit is contained in:
Tulir Asokan
2018-03-06 22:43:31 +02:00
parent 97957a5731
commit 3aff450bae
+3 -1
View File
@@ -880,7 +880,9 @@ class Portal:
"mimetype": thumbnail.mime_type,
"h": document.thumb.h,
"w": document.thumb.w,
"size": len(document.thumb.bytes)
"size": (len(document.thumb.bytes)
if isinstance(document.thumb, PhotoCachedSize)
else document.thumb.size)
}
info["thumbnail_url"] = thumbnail.mxc
if height and width: