From 7e2bbb143f5ba99732ae1b012395c3b629f88329 Mon Sep 17 00:00:00 2001 From: Tony Yang Date: Tue, 15 Apr 2025 10:27:25 +0800 Subject: [PATCH] update: change save user avatar --- functions/api/avatars/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/functions/api/avatars/index.js b/functions/api/avatars/index.js index 9856dab..ef1e7cb 100644 --- a/functions/api/avatars/index.js +++ b/functions/api/avatars/index.js @@ -35,8 +35,7 @@ export async function onRequestPut(context) { } // Upload the avatar to R2 - const fileExtension = fileTypeResult.ext; - const objectName = `avatars/${context.user.userId}.${fileExtension}`; + const objectName = `avatars/${context.user.userId}`; await env.MY_BUCKET.put(objectName, buffer); // Store the filename in D1