Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "skyflow-js",
"preferGlobal": true,
"analyze": false,
"version": "2.7.7",
"version": "2.7.7-dev.3747cd0",
"author": "Skyflow",
"description": "Skyflow JavaScript SDK",
"homepage": "https://github.com/skyflowapi/skyflow-js",
Expand Down
3 changes: 3 additions & 0 deletions src/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,16 @@

if (request.headers?.['content-type']?.includes(ContentType.FORMURLENCODED)
|| request.headers?.['content-type']?.includes(ContentType.FORMDATA)) {
console.log('Request body sent as is without stringifying since content-type is form related');

Check warning on line 100 in src/client/index.ts

View workflow job for this annotation

GitHub Actions / ci-checks

Unexpected console statement
httpRequest.send(request.body);
console.log('Request body sent as is without stringifying since content-type is form related');

Check warning on line 102 in src/client/index.ts

View workflow job for this annotation

GitHub Actions / ci-checks

Unexpected console statement
} else {
/* Earlier we were stringifying here, but due to TS, we're stringifying
at the point where we are creating the request. Since the body parameter
doesn't accept JSON object.
*/
httpRequest.send(request.body);
console.log('Request body sent as is without stringifying since content-type is form related');

Check warning on line 109 in src/client/index.ts

View workflow job for this annotation

GitHub Actions / ci-checks

Unexpected console statement
}

httpRequest.onload = () => {
Expand Down
6 changes: 3 additions & 3 deletions src/utils/helpers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,9 @@ export const fileValidation = (value, required: Boolean = false, fileElement) =>
}
}
}
if (value.size > 32000000) {
throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_FILE_SIZE, [], true);
}
// if (value.size > 32000000) {
// throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_FILE_SIZE, [], true);
// }
if (Object.prototype.hasOwnProperty.call(fileElement, 'blockEmptyFiles') && fileElement.blockEmptyFiles) {
if (value.size === 0) {
throw new SkyflowError(SKYFLOW_ERROR_CODE.INVALID_FILE_SIZE, [], true);
Expand Down
Loading