File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -350,7 +350,8 @@ imagekit.upload({
350350 value: ' w-100'
351351 }
352352 ]
353- }
353+ },
354+ checks= {` "file.size" < "1mb"` } // To run server side checks before uploading files. Notice the quotes around file.size and 1mb.
354355}, function (error , result ) {
355356 if (error) console .log (error);
356357 else console .log (result);
@@ -376,7 +377,8 @@ imagekit.upload({
376377 value: ' w-100'
377378 }
378379 ]
379- }
380+ },
381+ checks= {` "file.size" < "1mb"` }
380382}).then (response => {
381383 console .log (response);
382384}).catch (error => {
Original file line number Diff line number Diff line change 11{
22 "name" : " imagekit" ,
3- "version" : " 5.0.2 " ,
3+ "version" : " 5.1.0 " ,
44 "description" : " Offical NodeJS SDK for ImageKit.io integration" ,
55 "main" : " ./dist/index.js" ,
66 "types" : " ./dist/index.d.ts" ,
You can’t perform that action at this time.
0 commit comments