mirror of
https://github.com/nocodb/nocodb.git
synced 2026-02-01 23:38:21 +00:00
getBase64FileSize without buffering first
This commit is contained in:
@@ -192,9 +192,9 @@ export class DataAttachmentV3Service {
|
||||
|
||||
if (fileSize > NC_ATTACHMENT_FIELD_SIZE) {
|
||||
NcError.get(context).invalidRequestBody(
|
||||
`Attachment is larger than maximum allowed size at ${Math.floor(
|
||||
NC_ATTACHMENT_FIELD_SIZE / mb,
|
||||
)} mb`,
|
||||
`Attachment is larger than maximum allowed size at ${(
|
||||
NC_ATTACHMENT_FIELD_SIZE / mb
|
||||
).toFixed(2)} mb`,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
9
packages/nocodb/tests/unit/helpersTest/index.test.ts
Normal file
9
packages/nocodb/tests/unit/helpersTest/index.test.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { runOnSet } from '../utils/runOnSet';
|
||||
import { stringHelperTest } from './stringHelpers.test';
|
||||
|
||||
function _helperTests() {
|
||||
stringHelperTest();
|
||||
}
|
||||
export const helperTests = runOnSet(1, function () {
|
||||
describe('helpersTest', _helperTests);
|
||||
});
|
||||
18
packages/nocodb/tests/unit/helpersTest/stringHelpers.test.ts
Normal file
18
packages/nocodb/tests/unit/helpersTest/stringHelpers.test.ts
Normal file
File diff suppressed because one or more lines are too long
@@ -8,6 +8,9 @@ import { dataApiV3Test } from './rest/tests/dataApiV3/index.test';
|
||||
import { processorTests } from './processor/index.test';
|
||||
import { errorTests } from './error/index.test';
|
||||
import { rollupTests } from './rollup/index.test';
|
||||
import { linksTests } from './links/index.test';
|
||||
import { dbQueryClientTests } from './dbQueryClient/index.test';
|
||||
import { helperTests } from './helpersTest/index.test';
|
||||
|
||||
process.env.NODE_ENV = 'test';
|
||||
process.env.TEST = 'true';
|
||||
@@ -22,6 +25,7 @@ dotenv.config({
|
||||
(async function () {
|
||||
await TestDbMngr.init();
|
||||
|
||||
helperTests();
|
||||
modelTests();
|
||||
formulaTests();
|
||||
rollupTests();
|
||||
|
||||
Reference in New Issue
Block a user