var imageBuffer = new Buffer.alloc(data.size);
var fd = fs.openSync('/file.dat', 'r');
fs.readSync(fd, imageBuffer, 0, size, address);
let binary = Buffer.from(imageBuffer, 'binary');
fs.close(fd, function(){});
S.ajax({
url:"http://protocol.",
dataType: "json",
type:"GET",
data: {data: id, prog: progress},
success: function(result){
if(result){
let blob = new Blob([new ArrayBuffer(result.src)], {type: "image/jpeg"});
const url = window.URL.createObjectURL(blob);
image.src = url;
window.URL.revokeObjectURL(url);
drawScreen();
}
}
But The image does not appear.