mirror of
https://github.com/n8n-io/n8n.git
synced 2026-12-04 00:30:34 +00:00
Co-authored-by: n8n-cat-bot[bot] <283985454+n8n-cat-bot[bot]@users.noreply.github.com>
16 lines
814 B
Diff
16 lines
814 B
Diff
diff --git a/lib/make-middleware.js b/lib/make-middleware.js
|
|
--- a/lib/make-middleware.js
|
|
+++ b/lib/make-middleware.js
|
|
@@ -396,8 +396,7 @@ function makeMiddleware (setup) {
|
|
if (aborting) {
|
|
appender.removePlaceholder(placeholder)
|
|
- // On error the engine stored nothing and the file has no path, so
|
|
- // there is nothing to clean up; only record a successfully stored
|
|
- // file for the abort cleanup list.
|
|
- if (!err) uploadedFiles.push({ ...file, ...info })
|
|
+ // A failed disk write can leave a partial file. Keep it in the
|
|
+ // abort cleanup list when the storage engine assigned a path.
|
|
+ if (!err || file.path) uploadedFiles.push({ ...file, ...info })
|
|
return decrementPendingWrites()
|
|
}
|