feat: image compression w/ sharp

This commit is contained in:
Face 2025-06-14 19:06:22 +06:00
parent 7b11266f72
commit 861bb01a31
7 changed files with 1626 additions and 52 deletions

View file

@ -49,8 +49,7 @@ async function handleIconUpload(iconFile: File | null, symbol: string): Promise<
return await uploadCoinIcon(
symbol,
new Uint8Array(arrayBuffer),
iconFile.type,
iconFile.size
iconFile.type
);
}

View file

@ -91,8 +91,7 @@ export async function POST({ request }) {
const key = await uploadProfilePicture(
session.user.id,
new Uint8Array(arrayBuffer),
avatarFile.type,
avatarFile.size
avatarFile.type
);
updates.image = key;
} catch (e) {