Commit 21a0f975 authored by 张九刚's avatar 张九刚

修改buffer格式

parent 2339e01d
......@@ -270,10 +270,9 @@ async function execute(psdFile, options = {}) {
assets,
view: viewRoot,
};
return data;
/* let dataString = JSON.stringify(data);
let buf = new Buffer(dataString);
let dataString = JSON.stringify(data);
let buf = new Buffer.from(dataString);
return await new Promise((resolve, reject) => {
zlib.gzip(buf, function (err, res) {
if (err) {
......@@ -283,7 +282,7 @@ async function execute(psdFile, options = {}) {
resolve(res);
}
});
}) */
})
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment