fix(api): format image url for the api to recognize it and to save the user details

This commit is contained in:
Mrigakshi Roy Choudhury 2026-03-28 22:50:32 +05:30
parent 81ea141d48
commit 417d98c011

View file

@ -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',