Ask for help, how to convert base64 into pictures and upload them locally with node and display them at the front desk?

problem description: the pc side takes photos to get the base64 file, wants to upload this file to the local node service, and reads the photo file when querying

Jan.11,2022

    var formData = new FormData();
    var btn = document.getElementById("uploadImg");//
    var file = btn.files[0];
    formData.append('file',file);//formData
    var reader = new FileReader();//
    reader.onloadend = function () {       
        var dataURL = reader.result;
        var img = new Image();
        img.src = dataURL; 
        //  DOM 
        // ...
    };
    reader.readAsDataURL(file);

1. If the photo is obtained by base64, then send it to the server directly with post, and the server will save it
2. Directly assign a value to the src of img when taking it

<img src="data:image/jpeg;base64,xxxxxxxx"
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-1b3aca1-407cb.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-1b3aca1-407cb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?