mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-02-16 15:03:48 +00:00
fix(image-router): correct usage of rimraf
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
8e1db95067
commit
fec5e09664
1 changed files with 1 additions and 1 deletions
|
@ -83,7 +83,7 @@ imageRouter.post('/uploadimage', function (req, res) {
|
|||
form.parse(req, async function (err, fields, files) {
|
||||
if (err) {
|
||||
logger.error(`Image upload error: formidable error: ${err}`)
|
||||
rimraf(tmpDir)
|
||||
rimraf.sync(tmpDir)
|
||||
return errors.errorForbidden(res)
|
||||
} else if (!files.image || !files.image.filepath) {
|
||||
logger.error('Image upload error: Upload didn\'t contain file)')
|
||||
|
|
Loading…
Reference in a new issue