mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2024-12-14 08:26:22 +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 => {
|
||||
// Unlink temp files (do not wait)
|
||||
if (filesData.length) {
|
||||
Promise.all(filesData.map(async file =>
|
||||
utils.unlinkFile(file.filename).catch(logger.error)
|
||||
))
|
||||
Promise.all(filesData.map(async file => {
|
||||
if (file.filename) {
|
||||
utils.unlinkFile(file.filename).catch(logger.error)
|
||||
}
|
||||
}))
|
||||
}
|
||||
|
||||
// Re-throw suppressed errors as ClientError, otherwise as-is
|
||||
|
Loading…
Reference in New Issue
Block a user