diff --git a/server.ts b/server.ts index 72120f8c..2c56f4f3 100644 --- a/server.ts +++ b/server.ts @@ -6,9 +6,9 @@ const app = express(); const base = '/'; app.use(base, express.static('dist/client/')); app.use(ssrHandler); +app.use(express.json({ limit: "50mb" })) +app.use(express.urlencoded({ limit: "50mb" })) app.listen(80, function() { console.log('Server started on http://localhost:80'); -}); - - +}); \ No newline at end of file diff --git a/src/client/lib/ausweisSpeichern.ts b/src/client/lib/ausweisSpeichern.ts index 06b192d5..f7d409dc 100644 --- a/src/client/lib/ausweisSpeichern.ts +++ b/src/client/lib/ausweisSpeichern.ts @@ -105,7 +105,7 @@ export async function ausweisSpeichern( } const response = await api.aufnahme._uid.bilder.PUT.fetch({ - base64: bild.base64, + data: bild.data, kategorie: bild.kategorie }, { params: { diff --git a/src/client/lib/bilderHochladen.ts b/src/client/lib/bilderHochladen.ts index 0595e167..b804b160 100644 --- a/src/client/lib/bilderHochladen.ts +++ b/src/client/lib/bilderHochladen.ts @@ -22,7 +22,7 @@ export async function bilderHochladen( const imagesToUpload = images.filter( (image) => !image.uid || image.update ) as unknown as { - base64: string; + data: string; kategorie: string; uid?: string; update: boolean; @@ -46,7 +46,7 @@ export async function bilderHochladen( try { if (image.update) { await api.bilder._uid.PATCH.fetch({ - base64: image.base64, + data: image.data, kategorie: image.kategorie as Enums.BilderKategorie, }, { params: { @@ -58,7 +58,7 @@ export async function bilderHochladen( }); } else { const response = await api.aufnahme._uid.bilder.PUT.fetch({ - base64: image.base64, + data: image.data, kategorie: image.kategorie as Enums.BilderKategorie }, { params: { diff --git a/src/components/AnsichtsausweisButton.svelte b/src/components/AnsichtsausweisButton.svelte index df327808..11980618 100644 --- a/src/components/AnsichtsausweisButton.svelte +++ b/src/components/AnsichtsausweisButton.svelte @@ -11,7 +11,7 @@ export let ausweisart: Enums.Ausweisart -