Payload too large in Node

I am getting an error when I POST to my server, I am sending a base64 image (text) and since it's too large there seems to be an error with its length.

This is what I am using to try and fix it, but it won't.


var bodyParser = require('body-parser');

app.use(bodyParser({limit: '50mb'}));
app.use(bodyParser.urlencoded({limit: '50mb'}));

And the error I am getting on the console is the following:

POST 413 (Payload Too Large)

This is my home.ts code

let headers = new Headers();
headers.append('Content-Type', 'application/x-www-form-urlencoded' );

let postParams = {
image: (BASE64GoesHere)}"", postParams).
        subscribe(data => {