Ngx-quill: Error 413 Payload Too Large

Created on 7 Jun 2017  ·  2Comments  ·  Source: KillerCodeMonkey/ngx-quill

Hi, when I upload a image to the content, the error bellow happens:

Response {_body: "↵↵↵↵↵↵", status: 413, ok: false, statusText: "Payload Too Large", headers: Headers, …}
headers
:
Headers {_headers: Map(12), _normalizedNames: Map(12)} ok : false
status : 413
statusText : "Payload Too Large"
type : 2
url :
"http://www.adrianabartolomucci.com.br/api/servicos/59370f9d6993d8381cd31694"
_body
:
"↵↵↵Error↵↵↵

Error: request entity too large
   at readStream (/home/adrianabartolomucci/apps_nodejs/node_modules/body-parser/node_modules/raw-body/index.js:196:17)
   at getRawBody (/home/adrianabartolomucci/apps_nodejs/node_modules/body-parser/node_modules/raw-body/index.js:106:12)
   at read (/home/adrianabartolomucci/apps_nodejs/node_modules/body-parser/lib/read.js:76:3)
   at jsonParser (/home/adrianabartolomucci/apps_nodejs/node_modules/body-parser/lib/types/json.js:127:5)
   at Layer.handle [as handle_request] (/home/adrianabartolomucci/apps_nodejs/node_modules/express/lib/router/layer.js:95:5)
   at trim_prefix (/home/adrianabartolomucci/apps_nodejs/node_modules/express/lib/router/index.js:317:13)
   at /home/adrianabartolomucci/apps_nodejs/node_modules/express/lib/router/index.js:284:7
   at Function.process_params (/home/adrianabartolomucci/apps_nodejs/node_modules/express/lib/router/index.js:335:12)
   at next (/home/adrianabartolomucci/apps_nodejs/node_modules/express/lib/router/index.js:275:10)
   at /home/adrianabartolomucci/apps_nodejs/app.js:43:5
   at Layer.handle [as handle_request] (/home/adrianabartolomucci/apps_nodejs/node_modules/express/lib/router/layer.js:95:5)
   at trim_prefix (/home/adrianabartolomucci/apps_nodejs/node_modules/express/lib/router/index.js:317:13)
   at /home/adrianabartolomucci/apps_nodejs/node_modules/express/lib/router/index.js:284:7
   at Function.process_params (/home/adrianabartolomucci/apps_nodejs/node_modules/express/lib/router/index.js:335:12)
   at next (/home/adrianabartolomucci/apps_nodejs/node_modules/express/lib/router/index.js:275:10)
   at cors (/home/adrianabartolomucci/apps_nodejs/node_modules/cors/lib/index.js:185:7)
↵↵↵"
__proto__
:
Body

Most helpful comment

Thank you, solved problem setting the limit:

// Body Parser Middleware
app.use(bodyParser.json({limit: '50mb'}));
app.use(bodyParser.urlencoded({limit: '50mb', extended: true}));

All 2 comments

this has nothing to do with quill or ng-quill.

The body length is restricted by requests body parser middleware per default.
https://github.com/expressjs/body-parser#limit

Thank you, solved problem setting the limit:

// Body Parser Middleware
app.use(bodyParser.json({limit: '50mb'}));
app.use(bodyParser.urlencoded({limit: '50mb', extended: true}));

Was this page helpful?
0 / 5 - 0 ratings

Related issues

qikong333 picture qikong333  ·  5Comments

luksireiku picture luksireiku  ·  5Comments

anthonyinspace picture anthonyinspace  ·  3Comments

swymmwys picture swymmwys  ·  5Comments

jadamconnor picture jadamconnor  ·  5Comments