mirror of
https://github.com/spacebarchat/server.git
synced 2026-03-31 13:45:47 +00:00
Fix dependencies
This commit is contained in:
committed by
Rory&
parent
016c0ff760
commit
ebc063df97
@@ -157,11 +157,11 @@ export async function ImageProxy(req: Request, res: Response) {
|
||||
|
||||
const buffer = Buffer.from(arrayBuffer);
|
||||
if (sharp && sharpSupported.has(contentType)) {
|
||||
resultBuffer = await sharp
|
||||
resultBuffer = Buffer.from(await sharp
|
||||
.default(buffer)
|
||||
// Sharp doesn't support "scaleToFit"
|
||||
.resize(width)
|
||||
.toBuffer();
|
||||
.toBuffer());
|
||||
} else if (Jimp && jimpSupported.has(contentType)) {
|
||||
resultBuffer = await Jimp.read(buffer).then((image) => {
|
||||
contentType = image.getMIME();
|
||||
@@ -183,3 +183,5 @@ export async function ImageProxy(req: Request, res: Response) {
|
||||
|
||||
res.send(resultBuffer);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user