Skip to content

Commit 55adee3

Browse files
committed
remove image size checks and add insert images logs
1 parent d047619 commit 55adee3

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

src/apps/SpreadsheetApp/SpreadsheetAppp.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,16 @@
5555
insertImage(objAr_) {
5656
var ar, blob, dstSS, dstSheet, dstSheetId, e, requests, tmpId, tmpSheet, tmpSheetId, xlsxObj;
5757
if (!Array.isArray(objAr_) || (objAr_.some(({blob, range}) => {
58-
var height, identification, width;
58+
var identification;
5959
if (blob.toString() !== "Blob" || !range.row || !range.column || isNaN(range.row) || isNaN(range.column)) {
60+
console.log('[DocsServiceApp]', 'Issue with Blob or range coordinates')
6061
return true;
6162
}
62-
({width, height, identification} = ImgAppp.getSize(blob));
63-
if (width * height > 1048576) {
64-
return true;
65-
}
63+
({identification} = ImgAppp.getSize(blob));
6664
if (!(["GIF", "PNG", "JPG"].some((e) => {
6765
return e === identification;
6866
}))) {
67+
console.log('[DocsServiceApp]', 'Issue with file format', 'received', identification)
6968
return true;
7069
}
7170
return false;
@@ -84,7 +83,6 @@
8483
title: "SpreadsheetAppp_temp",
8584
mimeType: MimeType.GOOGLE_SHEETS
8685
}, blob).id;
87-
console.log(`LIB`, "TMP ID AFYTER INSER", tmpId);
8886
} catch (error) {
8987
e = error;
9088
console.log(`ERROR`, error);

0 commit comments

Comments
 (0)