Closed 7iomka closed 4 years ago
I didn't quite catch the code you posted(probably it is about separate MV lib), but from the issue description, I believe you are asking about this option: createParentPath.
You should specify it in the middleware options like this:
app.use(fileUpload({
useTempFiles : true,
tempFileDir : '/tmp/',
createParentPath: true
}));
Also be aware that to work properly this options needs node version 10 or higher.
Oh. my carelessness, sorry! But still, as for me, this option should be enabled by default! Thanks!
Hi. Without possibility to pass additional parameters to mv method i got errors, because output path not exist. MV lib for example have params
mkdirp: true
and that create recursively needed folders if not exist. Currently workaround is only with use tmp files like thatmv(path.resolve(rootPath, tempFilePath), path.resolve(rootPath,
src/assets/${mId}/${name}), { mkdirp: true }, err => {})
Any ideas? Thanks!