From 417d98c0114f80ba71aeea09979aa1c23a12506b Mon Sep 17 00:00:00 2001 From: Mrigakshi Roy Choudhury Date: Sat, 28 Mar 2026 22:50:32 +0530 Subject: [PATCH] fix(api): format image url for the api to recognize it and to save the user details --- js/profile.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/profile.js b/js/profile.js index a50b6be..eeec04f 100644 --- a/js/profile.js +++ b/js/profile.js @@ -39,7 +39,8 @@ const api = new MusicAPI(apiSettings); async function uploadImage(file) { try { - const response = await fetch(`https://worker.uploads.monochrome.qzz.io/${file.name}`, { + const fileNameWithoutSpace = file.name.replace(/\s/g, '_'); + const response = await fetch(`https://worker.uploads.monochrome.qzz.io/${fileNameWithoutSpace}`, { method: 'PUT', headers: { 'x-api-key': 'if_youre_reading_this_fuck_off',