Native node, receives the base64 image sent by ajax. It is too large and is truncated.

Native node, receives the base64 image sent by ajax is too large and is truncated

is it true that the size of the native node is limited and where is the size configured?

related codes

    req.on("data",function(data){
        var currentData = ""
        currentData += data;
        postData = qs.parse(currentData);//postData

        saveImage(postData.smallImage,0)
        saveImage(postData.bigImage,1)
        postData.smallImage = smallImageLink
        postData.bigImage = bigImageLink
        postData.character = postData.character.split(",")
        addData(postData)
    });

ask God for help

Aug.18,2021

var currentData = ""
req.on("data",function(data){
    currentData += data;
});
req.on("end",function(data){
   var postData = qs.parse(currentData);
});

if you use the bodyParser plug-in, you need to set the limit parameter.

if you use nginx, you also need to set the body limit

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3c30e-2c2d5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3c30e-2c2d5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?