Files
overleaf-cep/patches/multer+2.0.2.patch
Andrew Rumble c4d1e7f077 Add patch for multer 2.0.2
Co-authored-by: Ersun Warncke <ersun.warncke@overleaf.com>
GitOrigin-RevId: 68c0b31cf9db3dedefb48cb9b1bc212cfdb5b8d1
2025-07-29 08:06:11 +00:00

14 lines
684 B
Diff

diff --git a/node_modules/multer/lib/make-middleware.js b/node_modules/multer/lib/make-middleware.js
index 260dcb4..895b4b2 100644
--- a/node_modules/multer/lib/make-middleware.js
+++ b/node_modules/multer/lib/make-middleware.js
@@ -113,7 +113,7 @@ function makeMiddleware (setup) {
if (fieldname == null) return abortWithCode('MISSING_FIELD_NAME')
// don't attach to the files object, if there is no file
- if (!filename) return fileStream.resume()
+ if (!filename) filename = 'undefined'
// Work around bug in Busboy (https://github.com/mscdex/busboy/issues/6)
if (limits && Object.prototype.hasOwnProperty.call(limits, 'fieldNameSize')) {