scale down image on get sign url

This commit is contained in:
Sosokker 2025-05-12 00:25:40 +07:00
parent 79add76034
commit 56194b8e97

View File

@ -25,7 +25,12 @@ export async function uploadImageToSupabase(imageBase64: string, imageType: stri
const { data, error } = await supabase
.storage
.from("food")
.createSignedUrl(filePath, 31536000);
.createSignedUrl(filePath, 31536000, {
transform: {
width: 800,
height: 600,
}
});
if (error) {
console.error("[GET PUBLIC URL ERROR]", error);