Browse Source

fix(nocodb): keep the original name with prefix

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

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

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

Loading…
Cancel
Save