properly omit thumbnails from upload metadata

in cases where they would cause the metadata to be too large
This commit is contained in:
ansuz 2023-01-11 13:19:15 +05:30
parent 96de4dffe9
commit 38861e5b99
1 changed files with 1 additions and 1 deletions

View File

@ -148,7 +148,7 @@ define([
// if metadata is too large, drop the thumbnail. // if metadata is too large, drop the thumbnail.
if (plaintext.length > 65535) { if (plaintext.length > 65535) {
var temp = JSON.parse(JSON.stringify(metadata)); var temp = JSON.parse(JSON.stringify(metadata));
delete metadata.thumbnail; delete temp.thumbnail;
plaintext = Nacl.util.decodeUTF8(JSON.stringify(temp)); plaintext = Nacl.util.decodeUTF8(JSON.stringify(temp));
} }