# Upload document - Invalid request Content-Type

**URL:** <https://discuss.dwolla.com/t/upload-document-invalid-request-content-type/5727>\
**Category:** API Support\
**Created:** [May 8, 2020, 12:20pm UTC](https://discuss.dwolla.com/t/upload-document-invalid-request-content-type/5727 "2020-05-08T12:20:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ismail](https://avatars.discourse-cdn.com/v4/letter/i/779978/32.png) [@ismail](https://discuss.dwolla.com/u/ismail)\
**Post date:** [May 8, 2020, 12:20pm UTC](https://discuss.dwolla.com/t/upload-document-invalid-request-content-type/5727/1 "2020-05-08T12:20:27Z")

</div>

Hello Community, I need your help to upload a document  
I did several tests but I receive the same error: Invalid request Content-Type. multipart/form-data.

Here are some details of the request, the versions of the packages and the error that I receive:  
Env: Nodejs  
Package versions:

- dwolla-v2: 3.1.2
- form-data: 2.5.1

Request:  
const requestBody = new FormData();

```
requestBody.append('file', fs.createReadStream(file), {
  filename: name,
  contentType: 'image/png',
  knownLength: fs.statSync(file).size
});
requestBody.append('documentType', 'license');

const endpoint = `customers/${customerId}/documents`;
return requestDwollaAPI(POST, endpoint, requestBody);

```

Error:  
{ err:  
{ Error: {“code”:“UnsupportedRequestContentType”,“message”:“Invalid request Content-Type. multipart/form-data.”}  
at errorFrom (/home/ismail/Developement/sharegro/sharegro-api/gate/node\_modules/dwolla-v2/src/dwolla/Token.js:49:15)  
at /home/ismail/Developement/sharegro/sharegro-api/gate/node\_modules/dwolla-v2/src/dwolla/Token.js:70:29  
at tryCatcher (/home/ismail/Developement/sharegro/sharegro-api/gate/node\_modules/bluebird/js/release/util.js:16:23)  
at Promise.\_settlePromiseFromHandler (/home/ismail/Developement/sharegro/sharegro-api/gate/node\_modules/bluebird/js/release/promise.js:517:31)  
at Promise.\_settlePromise (/home/ismail/Developement/sharegro/sharegro-api/gate/node\_modules/bluebird/js/release/promise.js:574:18)  
at Promise.\_settlePromise0 (/home/ismail/Developement/sharegro/sharegro-api/gate/node\_modules/bluebird/js/release/promise.js:619:10)  
at Promise.\_settlePromises (/home/ismail/Developement/sharegro/sharegro-api/gate/node\_modules/bluebird/js/release/promise.js:699:18)  
at \_drainQueueStep (/home/ismail/Developement/sharegro/sharegro-api/gate/node\_modules/bluebird/js/release/async.js:138:12)  
at \_drainQueue (/home/ismail/Developement/sharegro/sharegro-api/gate/node\_modules/bluebird/js/release/async.js:131:9)  
at Async.\_drainQueues (/home/ismail/Developement/sharegro/sharegro-api/gate/node\_modules/bluebird/js/release/async.js:147:5)  
at Immediate.Async.drainQueues [as \_onImmediate] (/home/ismail/Developement/sharegro/sharegro-api/gate/node\_modules/bluebird/js/release/async.js:17:14)  
at runCallback (timers.js:705:18)  
at tryOnImmediate (timers.js:676:5)  
at processImmediate (timers.js:658:5)  
at process.topLevelDomainCallback (domain.js:126:23)  
status: 415,  
headers: Headers { [Symbol(map)]: [Object] },  
body:  
{ code: ‘UnsupportedRequestContentType’,  
message: ‘Invalid request Content-Type. multipart/form-data.’ } } }

---

<div class="post-metadata">

**Author:** ![shreya](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/shreya/32/2154_2.png) [@shreya](https://discuss.dwolla.com/u/shreya)\
**Post date:** [May 8, 2020, 4:32pm UTC](https://discuss.dwolla.com/t/upload-document-invalid-request-content-type/5727/2 "2020-05-08T16:32:34Z")

</div>

Hi @ismail – would you be able to share the Customer ID for whom you got the error trying to upload the document? I could take a look at what we’re receiving in the request.

I just tried the request with the following versions and I was able to get a successful response -

```auto
 "dwolla-v2": "^3.1.2",
 "form-data": "^3.0.0"

```
