Skip to content

Commit

Permalink
fix: issue with attachment upload
Browse files Browse the repository at this point in the history
  • Loading branch information
mertmit committed Feb 29, 2024
1 parent eee1674 commit ec6953d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/nocodb/src/services/attachments.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down

1 comment on commit ec6953d

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR changes have been deployed. Please run the following command to verify:

docker run -d -p 8888:8080 nocodb/nocodb-timely:0.204.1-pr-7756-20240229-1056

Please sign in to comment.