diff --git a/packages/plugins/file-manager/src/storages/local.ts b/packages/plugins/file-manager/src/storages/local.ts index 089cdfa98..5888328a5 100644 --- a/packages/plugins/file-manager/src/storages/local.ts +++ b/packages/plugins/file-manager/src/storages/local.ts @@ -1,6 +1,5 @@ import Application from '@nocobase/server'; import serve from 'koa-static'; -import mkdirp from 'mkdirp'; import multer from 'multer'; import path from 'path'; import { URL } from 'url'; @@ -113,7 +112,7 @@ export default { return multer.diskStorage({ destination: function (req, file, cb) { const destPath = path.join(getDocumentRoot(storage), storage.path); - mkdirp(destPath, (err: Error | null) => cb(err, destPath)); + cb(null, destPath); }, filename: getFilename, });