From 3cfd017538d87230ab36c42fe1392a1880ec2297 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 9 Jan 2023 14:03:22 +0900 Subject: [PATCH] =?UTF-8?q?fix(server):=20=E7=89=B9=E5=AE=9A=E3=81=AEPNG?= =?UTF-8?q?=E7=94=BB=E5=83=8F=E3=81=AE=E3=82=A2=E3=83=83=E3=83=97=E3=83=AD?= =?UTF-8?q?=E3=83=BC=E3=83=89=E3=81=AB=E5=A4=B1=E6=95=97=E3=81=99=E3=82=8B?= =?UTF-8?q?=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: haru <64310155+usbharu@users.noreply.github.com> --- CHANGELOG.md | 1 + packages/backend/src/core/FileInfoService.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f468bc3cb..44b5c30dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -100,6 +100,7 @@ You should also include the user name that made the change. - Server: pages/likeのエラーIDが重複しているのを修正 @syuilo - Server: pages/updateのパラメータによってはsummaryの値が更新されないのを修正 @syuilo - Server: Escape SQL LIKE @mei23 +- Server: 特定のPNG画像のアップロードに失敗する問題を修正 @usbharu - Server: 非公開のクリップのURLでOGPレンダリングされる問題を修正 @syuilo - Client: case insensitive emoji search @saschanaz - Client: InAppウィンドウが操作できなくなることがあるのを修正 @tamaina diff --git a/packages/backend/src/core/FileInfoService.ts b/packages/backend/src/core/FileInfoService.ts index dad94da42..67337b505 100644 --- a/packages/backend/src/core/FileInfoService.ts +++ b/packages/backend/src/core/FileInfoService.ts @@ -398,13 +398,13 @@ export class FileInfoService { .raw() .ensureAlpha() .resize(64, 64, { fit: 'inside' }) - .toBuffer((err, buffer, { width, height }) => { + .toBuffer((err, buffer, info) => { if (err) return reject(err); let hash; try { - hash = encode(new Uint8ClampedArray(buffer), width, height, 5, 5); + hash = encode(new Uint8ClampedArray(buffer), info.width, info.height, 5, 5); } catch (e) { return reject(e); }