Commit e9f9c414 authored by rockyl's avatar rockyl

init

parent a68139ce
...@@ -164,7 +164,7 @@ async function tinifyOnce(input, type, cdnRoot) { ...@@ -164,7 +164,7 @@ async function tinifyOnce(input, type, cdnRoot) {
return; return;
} }
const buffer = await (0, compress_1.compressImage)(input.buffer, type); const buffer = await (0, compress_1.compressImage)(input.buffer, type);
console.log('compressImage size:', buffer.length); console.log(`compressImage size: ${input.buffer.length} => ${buffer.length}`);
if (cdnRoot) { if (cdnRoot) {
const cdnPath = path.join(cdnRoot, objectHash(buffer) + input.extname); const cdnPath = path.join(cdnRoot, objectHash(buffer) + input.extname);
return (0, ali_oss_duiba_1.uploadFile)(buffer, cdnPath); return (0, ali_oss_duiba_1.uploadFile)(buffer, cdnPath);
......
This diff is collapsed.
...@@ -166,7 +166,7 @@ async function tinifyOnce(input, type, cdnRoot) { ...@@ -166,7 +166,7 @@ async function tinifyOnce(input, type, cdnRoot) {
return return
} }
const buffer = await compressImage(input.buffer, type) const buffer = await compressImage(input.buffer, type)
console.log('compressImage size:', buffer.length) console.log(`compressImage size: ${input.buffer.length} => ${buffer.length}`)
if (cdnRoot) { if (cdnRoot) {
const cdnPath = path.join(cdnRoot, objectHash(buffer) + input.extname) const cdnPath = path.join(cdnRoot, objectHash(buffer) + input.extname)
return uploadFile(buffer, cdnPath) return uploadFile(buffer, cdnPath)
......
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