Browse Source

feat(nocodb): remove original name from file name

pull/4931/head
Wing-Kam Wong 2 years ago
parent
commit
f96b18d2b4
  1. 2
      packages/nocodb/src/lib/meta/api/attachmentApis.ts

2
packages/nocodb/src/lib/meta/api/attachmentApis.ts

@ -52,7 +52,7 @@ export async function upload(req: Request, res: Response) {
const attachments = await Promise.all(
(req as any).files?.map(async (file) => {
const fileName = `${nanoid(6)}_${file.originalname}`;
const fileName = `${nanoid(18)}${path.extname(file.originalname)}`;
let url = await storageAdapter.fileCreate(
slash(path.join(destPath, fileName)),

Loading…
Cancel
Save