-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Description
Current Behavior
The file upload flow using the http-in
and http response
nodes fails. When uploading a png file using the curl command, the Node-RED editor outputs the following error. And curl command returns Internal Server Error
.

"name":"InternalServerError",
"message":"stream is not readable",
"stack":"InternalServerError: stream is not readable\n at readStream (/Users/kazuhitoyokoi/.nvm/versions/node/v24.4.1/lib/node_modules/node-red/node_modules/raw-body/index.js:185:17)\n at getRawBody (/Users/kazuhitoyokoi/.nvm/versions/node/v24.4.1/lib/node_modules/node-red/node_modules/raw-body/index.js:116:12)\n at rawBodyParser (/Users/kazuhitoyokoi/.nvm/versions/node/v24.4.1/lib/node_modules/node-red/node_modules/@node-red/nodes/core/network/21-httpin.js:63:9)\n at Layer.handle [as handle_request] (/Users/kazuhitoyokoi/.nvm/versions/node/v24.4.1/lib/node_modules/node-red/node_modules/express/lib/router/layer.js:95:5)\n at next (/Users/kazuhitoyokoi/.nvm/versions/node/v24.4.1/lib/node_modules/node-red/node_modules/express/lib/router/route.js:149:13)\n at /Users/kazuhitoyokoi/.nvm/versions/node/v24.4.1/lib/node_modules/node-red/node_modules/@node-red/nodes/core/network/21-httpin.js:327:25\n at done (/Users/kazuhitoyokoi/.nvm/versions/node/v24.4.1/lib/node_modules/node-red/node_modules/multer/lib/make-middleware.js:59:7)\n at indicateDone (/Users/kazuhitoyokoi/.nvm/versions/node/v24.4.1/lib/node_modules/node-red/node_modules/multer/lib/make-middleware.js:63:68)\n at Multipart.<anonymous> (/Users/kazuhitoyokoi/.nvm/versions/node/v24.4.1/lib/node_modules/node-red/node_modules/multer/lib/make-middleware.js:182:7)\n at Multipart.emit (node:events:507:28)"
In the http-in
node property setting, I checked the Accept file uploads
only.
Expected Behavior
This example flow shows the image preview on the Node-RED v4.0.9 as follows. And curl command returns {}
.

Steps To Reproduce
- Import the example flow to Node-RED flow editor
- Download the png file to the current directory
wget https://nodered.org/about/resources/media/node-red-icon.png
- Upload the png file to Node-RED endpoint
curl -X POST http://localhost:1880/upload -F "file=@node-red-icon.png"
Example flow
[{"id":"b4acce50cd831767","type":"http in","z":"cda04605a4c46de8","name":"","url":"/upload","method":"post","upload":true,"swaggerDoc":"","x":130,"y":80,"wires":[["2c244bcab8038c09"]]},{"id":"cc26d7e4122552f5","type":"http response","z":"cda04605a4c46de8","name":"","statusCode":"","headers":{},"x":490,"y":80,"wires":[]},{"id":"2c244bcab8038c09","type":"image","z":"cda04605a4c46de8","name":"","width":160,"data":"req.files[0].buffer","dataType":"msg","thumbnail":false,"active":true,"pass":true,"outputs":1,"x":320,"y":80,"wires":[["cc26d7e4122552f5"]]},{"id":"7206c40ade6541a2","type":"global-config","env":[],"modules":{"node-red-contrib-image-output":"0.6.4"}}]
Environment
- Node-RED version: 4.1.0-beta.2
- Node.js version: 24.4.1
- npm version: 11.4.2
- Platform/OS: Macbook Air M1 2020 / macOS Sequoia 15.5
- Browser: Google Chrome Version 138.0.7204.158 (Official Build) (arm64)