7.0.2
macOS
Create cloud function as https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/master/functions/http/index.js
exports.uploadFile = (req, res) => {
please see in the example link above
};
run firebase serve
Create cloud function as https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/master/functions/http/index.js
exports.uploadFile = (req, res) => {
please see in the example link above
};
run firebase serve
Call the function via HTTP POST with Content-Type multipart/form-data
Run cloud function and response
events.js:174
throw er; // Unhandled 'error' event
^Error: Unexpected end of multipart data
at /Users/jarruspong/Downloads/Dev/concordian-api/node_modules/dicer/lib/Dicer.js:62:28
at process._tickCallback (internal/process/next_tick.js:61:11)
Emitted 'error' event at:
at Busboy.emit (/Users/jarruspong/Downloads/Dev/concordian-api/node_modules/busboy/lib/main.js:38:33)
at Dicer.(/Users/jarruspong/Downloads/Dev/concordian-api/node_modules/busboy/lib/types/multipart.js:281:9)
at Dicer.emit (events.js:198:13)
at Dicer.emit (/Users/jarruspong/Downloads/Dev/concordian-api/node_modules/dicer/lib/Dicer.js:80:35)
at /Users/jarruspong/Downloads/Dev/concordian-api/node_modules/dicer/lib/Dicer.js:62:14
at process._tickCallback (internal/process/next_tick.js:61:11)
@coffeemilkcrazy thanks for filing this! I don't think we've tested multipart before so sounds like a bug. I'll see what @abeisgoat thinks.
I am having the same problem and downgrading the tools isn't an option. Any clarifications on what the issue actually is? Thanks.
Same problem here, having to do all testing against firebase which is very time consuming. Any options to fix this?
Did anyone find a fix yet?
Yes #1448 will fix this
Doesnt seem to work still
@Salman9000 that fix will be released in version 7.1.0
Do you happen to know the release time?
@Salman9000 it will likely be today but we don't offer release timelines. Please subscribe to releases on Github to get notifications.
It's working now as of firebase-tools 7.10. Thank you so much.
We just need to upgrade the firebase tools to fix this issue.
Case 1: If you've installed firebase tools as your package dependency, run below code
npm i firebase-tools
Case 2: If you've installed firebase tools as global dependency,run below code
npm i -g firebase-tools

I'm still getting this issue when serving locally (though not when deploying to Firebase).
using firebase-tools 7.2.2
I had the same problem and ultimately downgraded firebase-tools to 6.8.0 which is what I'm still on and posting multi-part images locally works fine.
Most helpful comment
@Salman9000 that fix will be released in version
7.1.0