organiza podcasts apis

This commit is contained in:
thierryverse 2025-11-12 16:59:56 +02:00
parent 78ab020d80
commit 0e488c799d
4 changed files with 302 additions and 185 deletions

View file

@ -0,0 +1,20 @@
const uploadDocument = async (formData: FormData) => {
const response = await fetch(
`${process.env.NEXT_PUBLIC_FASTAPI_BACKEND_URL}/api/v1/documents/fileupload`,
{
method: "POST",
headers: {
Authorization: `Bearer ${window.localStorage.getItem(
"surfsense_bearer_token"
)}`,
},
body: formData,
}
);
if (!response.ok) {
throw new Error("Upload failed");
}
await response.json();
};