Open nickanna42 opened 7 years ago
did you solve this? i have the same question T T
Fueokbq, my personal work around was to use the "bring your own express" option for keystone. I initiated my express instance, and injected my routing which required busboy to this express instance. I then feed the custom express instance to keystone when I start it. This ensures my routes which require a custom request parsing are not effected by any peculiarities in keystone.
@fueokbq
We forked keystone and added an exception where multer is included in express (mount.js for v0.3.x and bindBodyParser.js for v4.x)
BusBoy was used on the excluded route for handling large streaming uploads (largest file uploaded was >100GB)
We also updated multer to 1.3.0 in the fork.
app.use(/\/((?!attachments\/upload).)*/, bodyParser.json(bodyParserParams));
bodyParserParams.extended = true;
app.use(/\/((?!attachments\/upload).)*/, bodyParser.urlencoded(bodyParserParams));
app.use(/\/((?!attachments\/upload).)*/, multer({
includeEmptyFields: true,
}).any());
busboy, multiparty, multer, etc are not working. The issue seems to be that by the time they are passed the
req
stream, it has already been parsed. The goal is to have one route have access to the rawIncomingMessage
stream../public/test-upload.html
./routes/index.js
./routes/api/temp.js
Expected behavior
From console:
Actual/Current behavior
From console
Steps to reproduce the actual/current behavior
Environment