Browse Source

Merge pull request #7756 from nocodb/nc-fix/att-body

fix: issue with attachment upload
pull/7758/head
Raju Udava 9 months ago committed by GitHub
parent
commit
2b391d6fdd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 9
      packages/nocodb/src/services/attachments.service.ts

9
packages/nocodb/src/services/attachments.service.ts

@ -12,6 +12,7 @@ import Local from '~/plugins/storage/Local';
import mimetypes, { mimeIcons } from '~/utils/mimeTypes';
import { PresignedUrl } from '~/models';
import { utf8ify } from '~/helpers/stringHelpers';
import { NcError } from '~/helpers/catchError';
@Injectable()
export class AttachmentsService {
@ -34,6 +35,10 @@ export class AttachmentsService {
const attachments = [];
const errors = [];
if (!param.files?.length) {
NcError.badRequest('No attachment provided!');
}
queue.addAll(
param.files?.map((file) => async () => {
try {
@ -127,6 +132,10 @@ export class AttachmentsService {
const attachments = [];
const errors = [];
if (!param.urls?.length) {
NcError.badRequest('No attachment provided!');
}
queue.addAll(
param.urls?.map?.((urlMeta) => async () => {
try {

Loading…
Cancel
Save