mirror of https://github.com/xwiki-labs/cryptpad
properly omit thumbnails from upload metadata
in cases where they would cause the metadata to be too large
This commit is contained in:
parent
96de4dffe9
commit
38861e5b99
|
@ -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));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue