mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-03-15 09:41:47 +00:00
Merge pull request #1544 from hedgedoc/fix/stop-swollowing-errors
fix(image-upload): Fix swallowing of errors for filesystem
This commit is contained in:
commit
277a2424bc
1 changed files with 1 additions and 1 deletions
|
@ -22,7 +22,7 @@ exports.uploadImage = function (imagePath, callback) {
|
|||
try {
|
||||
fs.copyFileSync(imagePath, path.join(config.uploadsPath, fileName))
|
||||
} catch (e) {
|
||||
callback(new Error('Error while moving file'), null)
|
||||
callback(new Error(`Error while moving file: ${e.message}`), null)
|
||||
return
|
||||
}
|
||||
callback(null, (new URL(fileName, config.serverURL + '/uploads/')).href)
|
||||
|
|
Loading…
Reference in a new issue