Authored by yyq

fix stream

... ... @@ -2,7 +2,6 @@
const Router = require('koa-router');
const _ = require('lodash');
const md5 = require('md5');
const stream = require('stream');
const CDNCONFIG = require('../../../config/cdn_config');
... ... @@ -37,16 +36,10 @@ const client = {
};
}
let ste = new Buffer.from(JSON.stringify({
let readable = new Buffer.from(JSON.stringify({
files: trimFiles,
revision
}));
const bufferStream = new stream.PassThrough();
let readable = bufferStream.end(new Buffer.from(JSON.stringify({
files: trimFiles,
revision
})));
let config = _.cloneDeep(CDNCONFIG.main);
_.assign(config, {
... ...