Merge pull request #447 from Mrigakshi-RC/fix/whitespace-avatar

fix(api): format image url for the api to recognize it and to save the user details
This commit is contained in:
edidealt 2026-03-28 22:55:08 +02:00 committed by GitHub
commit eea8e5d957
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -39,7 +39,8 @@ const api = new MusicAPI(apiSettings);
async function uploadImage(file) { async function uploadImage(file) {
try { 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', method: 'PUT',
headers: { headers: {
'x-api-key': 'if_youre_reading_this_fuck_off', 'x-api-key': 'if_youre_reading_this_fuck_off',