summaryrefslogtreecommitdiff
path: root/packages/backend/src/core/FileInfoService.ts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2023-01-09 14:03:22 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2023-01-09 14:03:22 +0900
commit3cfd017538d87230ab36c42fe1392a1880ec2297 (patch)
tree6f1a4a732e63702a94535e044e4ad2ce120b742f /packages/backend/src/core/FileInfoService.ts
parentenhance(client): force lazy load some images (diff)
downloadsharkey-3cfd017538d87230ab36c42fe1392a1880ec2297.tar.gz
sharkey-3cfd017538d87230ab36c42fe1392a1880ec2297.tar.bz2
sharkey-3cfd017538d87230ab36c42fe1392a1880ec2297.zip
fix(server): 特定のPNG画像のアップロードに失敗する問題を修正
Co-Authored-By: haru <64310155+usbharu@users.noreply.github.com>
Diffstat (limited to 'packages/backend/src/core/FileInfoService.ts')
-rw-r--r--packages/backend/src/core/FileInfoService.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/backend/src/core/FileInfoService.ts b/packages/backend/src/core/FileInfoService.ts
index dad94da421..67337b5056 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);
}