Nightly: Revert Drag & Drop Upload (server endpoint + header handlers removed)

This commit is contained in:
vibe-bot 2025-08-10 02:16:09 +02:00
parent 9e7b572feb
commit 6f51c493ed
3 changed files with 5 additions and 58 deletions

View file

@ -184,21 +184,7 @@ export async function playUrl(url: string, guildId: string, channelId: string, v
}
}
export async function uploadFile(file: File, folder?: string) {
const form = new FormData();
form.append('file', file);
if (folder) form.append('folder', folder);
const res = await fetch(`${API_BASE}/upload`, {
method: 'POST',
credentials: 'include',
body: form
});
if (!res.ok) {
const data = await res.json().catch(()=>({}));
throw new Error(data?.error || 'Upload failed');
}
return res.json();
}
// uploadFile removed (build reverted)