问题描述:

I'm attempting to send a file from a phonegap application to a nodejs server and am having problems with the content-type of the request headers.

Error: unrecognized content-type: multipart/form-data;boundary express=++++++

The code is taken directly from the example at Phonegap. When the server receives the request, it throws the above error. Any idea what could be causing this behaviour?

网友答案:

It's because the multiparty library version you are using requires there to be a space in between the semicolon after form-data and boundary. Information on how to fix it is located at here. Either update to use that version or change the file manually yourself, nested in the node_modules folder in your app.

相关阅读:
Top