mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2024-12-14 16:36:21 +00:00
fix: errors thrown when url uploads get rejected
This commit is contained in:
parent
5bab3a495e
commit
ec4d54573a
@ -637,9 +637,11 @@ self.actuallyUploadUrls = async (req, res, user, data = {}) => {
|
|||||||
})).catch(async error => {
|
})).catch(async error => {
|
||||||
// Unlink temp files (do not wait)
|
// Unlink temp files (do not wait)
|
||||||
if (filesData.length) {
|
if (filesData.length) {
|
||||||
Promise.all(filesData.map(async file =>
|
Promise.all(filesData.map(async file => {
|
||||||
|
if (file.filename) {
|
||||||
utils.unlinkFile(file.filename).catch(logger.error)
|
utils.unlinkFile(file.filename).catch(logger.error)
|
||||||
))
|
}
|
||||||
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Re-throw suppressed errors as ClientError, otherwise as-is
|
// Re-throw suppressed errors as ClientError, otherwise as-is
|
||||||
|
Loading…
Reference in New Issue
Block a user