Basic version of eventmedia-management (upload,

save in database)
This commit is contained in:
2025-07-10 09:32:35 +00:00
parent 43306130f7
commit 16581a974f
4 changed files with 23 additions and 15 deletions

View File

@@ -1,4 +1,3 @@
@import "../node_modules/@syncfusion/ej2-react-filemanager/styles/material.css";
@import "../node_modules/@syncfusion/ej2-base/styles/material.css";
@import "../node_modules/@syncfusion/ej2-buttons/styles/material.css";
@import "../node_modules/@syncfusion/ej2-calendars/styles/material.css";
@@ -11,6 +10,10 @@
@import "../node_modules/@syncfusion/ej2-react-schedule/styles/material.css";
@import "../node_modules/@syncfusion/ej2-kanban/styles/material.css";
@import "../node_modules/@syncfusion/ej2-notifications/styles/material.css";
@import "../node_modules/@syncfusion/ej2-react-filemanager/styles/material.css";
@import "../node_modules/@syncfusion/ej2-layouts/styles/material.css";
@import "../node_modules/@syncfusion/ej2-grids/styles/material.css";
@import "../node_modules/@syncfusion/ej2-icons/styles/material.css";
body {
font-family: Inter, 'Segoe UI', Roboto, Arial, sans-serif;

View File

@@ -72,4 +72,4 @@ button:focus-visible {
button {
background-color: #f9f9f9;
}
} */
} */

View File

@@ -29,16 +29,6 @@ const Media: React.FC = () => {
.then(setMediaList);
}, []);
// Upload-Handler (vereinfachtes Beispiel)
const handleUpload = async (e: React.ChangeEvent<HTMLInputElement>) => {
if (!e.target.files?.length) return;
const formData = new FormData();
formData.append('file', e.target.files[0]);
await fetch('/api/eventmedia/upload', { method: 'POST', body: formData });
// Nach Upload neu laden
const res = await fetch('/api/eventmedia');
setMediaList(await res.json());
};
// Speichern von Metadaten/Event-Zuordnung
const handleSave = async (data: { title: string; description: string; eventId?: string }) => {