fix(plugin-file-manager): remove mkdirp

This commit is contained in:
chenos 2022-04-26 20:37:59 +08:00
parent 62eb85de5f
commit 9dabe2fbd6

View File

@ -1,6 +1,5 @@
import Application from '@nocobase/server'; import Application from '@nocobase/server';
import serve from 'koa-static'; import serve from 'koa-static';
import mkdirp from 'mkdirp';
import multer from 'multer'; import multer from 'multer';
import path from 'path'; import path from 'path';
import { URL } from 'url'; import { URL } from 'url';
@ -113,7 +112,7 @@ export default {
return multer.diskStorage({ return multer.diskStorage({
destination: function (req, file, cb) { destination: function (req, file, cb) {
const destPath = path.join(getDocumentRoot(storage), storage.path); const destPath = path.join(getDocumentRoot(storage), storage.path);
mkdirp(destPath, (err: Error | null) => cb(err, destPath)); cb(null, destPath);
}, },
filename: getFilename, filename: getFilename,
}); });