我在Linux上的Docker环境中开发了一个名为Chromium headless的应用程序,它由木偶操纵者控制。In the future, unclaimed promise rejections will end the Node.js process with a non-zero exit code.我使用的是Chromium 80版和Puppeteer 5.4.1版。我试过降低Chromium和Pupp
我使用以下命令成功地将图像作为二进制字符串从木偶操纵者page.evaluate()函数传递回node.js: async function getBinaryString(url) {
returnimage.png”, new Buffer.from(binaryString, "binary"), function (err) { }); 但现在我希望将此PNG图像转换为base64,而不是先将其保存到文件中,因为我会将其上传到不同的服