Upload post data of Buffer type

requirements:
use Nodejs to send buffer (read data returned from files) type data to the backend through http.request using post type, and the
backend is the Django framework.

question:

  requestpostchunkNoderequest.write(buffer),post
  
 
  
Nodejs:
function  doapost(data,i) {
    return new Promise(function (resolve,reject) {
        let contents = data
        let options = {
            host: "localhost",
            path: "/nodepost/",
            port: 8000,
            method: "POST"
        };
        let req = http.request(options, function (res) {
            console.log(""+i+"")
            res.on("data", function (chunk) {
                console.log(chunk);
            });
            res.on("end", function (d) {
                resolve("end");
            });
            res.on("error", function (e) {
                reject(e);
            })
        });
        console.log(contents)
        req.write(contents);
        req.end();
        contents = null;
    })
}
Django:
def nodepost(request):
    return HttpResponse(request.read())

run result:

clipboard.png
you can see that request.read does not return data, and request.body of Django does not return data either. How do you get buffer data on the backend?

Mar.09,2021
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-1e3c788-446bb.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-1e3c788-446bb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?