What is the problem that the formidable module in nodejs cannot get the data?

excuse me.
because of the small amount of data, I directly use find limit skip for paging
there is no problem when I use the code.

var page = 1;
    var pageSize = 5;
    var count = (page - 1) * pageSize;
    Coupon.find({}).limit(pageSize).skip(count).exec(function (err, rs) {
        res.json(rs);
    })

but you won"t get any data if you use it this way.

    var form = new formidable.IncomingForm();
    form.parse(req, function (err, fields, files) {
        Coupon.find({}).limit(fields.pageSize).skip((fields.page - 1) * fields.pageSize).exec(function (err, rs) {
            res.json(rs);
        })
    });

could you tell me how to solve the problem

Mar.04,2021

solved it by himself.
fields.page and fields.pageSize get the string
, so convert it to ok

.
fields.pageSize = parseInt(fields.pageSize);
fields.page= parseInt(fields.page);
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-1e3be69-44672.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-1e3be69-44672.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?