Browse Source

fix: update file upload with correct field name

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5444/head
Pranav C 2 years ago
parent
commit
e36a486e07
  1. 1
      packages/nocodb-nest/src/filters/global-exception/global-exception.filter.ts
  2. 2
      packages/nocodb-nest/src/modules/attachments/attachments.controller.ts

1
packages/nocodb-nest/src/filters/global-exception/global-exception.filter.ts

@ -51,6 +51,7 @@ export class GlobalExceptionFilter implements ExceptionFilter {
if (exception.getStatus?.()) { if (exception.getStatus?.()) {
response.status(exception.getStatus()).json(exception.getResponse()); response.status(exception.getStatus()).json(exception.getResponse());
} else { } else {
// todo: change the response code
response.status(400).json({ response.status(400).json({
msg: exception.message, msg: exception.message,
}); });

2
packages/nocodb-nest/src/modules/attachments/attachments.controller.ts

@ -47,7 +47,7 @@ export class AttachmentsController {
@HttpCode(200) @HttpCode(200)
@UseInterceptors( @UseInterceptors(
UploadAllowedInterceptor, UploadAllowedInterceptor,
FilesInterceptor('files[]', null, { FilesInterceptor('files', null, {
storage: multer.diskStorage({}), storage: multer.diskStorage({}),
// limits: { // limits: {
// fieldSize: NC_ATTACHMENT_FIELD_SIZE, // fieldSize: NC_ATTACHMENT_FIELD_SIZE,

Loading…
Cancel
Save