feat: image compression w/ sharp
This commit is contained in:
parent
7b11266f72
commit
861bb01a31
7 changed files with 1626 additions and 52 deletions
|
|
@ -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
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Reference in a new issue