Browse Source

fix(nocodb): nanoid(6) -> nanoid(18)

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

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

@ -96,7 +96,7 @@ export async function uploadViaURL(req: Request, res: Response) {
req.body?.map?.(async (urlMeta) => { req.body?.map?.(async (urlMeta) => {
const { url, fileName: _fileName } = urlMeta; const { url, fileName: _fileName } = urlMeta;
const fileName = `${nanoid(6)}${_fileName || url.split('/').pop()}`; const fileName = `${nanoid(18)}${_fileName || url.split('/').pop()}`;
let attachmentUrl = await (storageAdapter as any).fileCreateByUrl( let attachmentUrl = await (storageAdapter as any).fileCreateByUrl(
slash(path.join(destPath, fileName)), slash(path.join(destPath, fileName)),

Loading…
Cancel
Save