fix of the json upload format

This commit is contained in:
2026-08-04 20:44:15 +02:00
parent 88f124c991
commit 91ddc6e864
2 changed files with 8 additions and 3 deletions
+7 -2
View File
@@ -127,6 +127,7 @@
padding-bottom: 0;
}
</style>
<meta name="csrf-token" content="{{ csrf_token() }}">
</head>
<body>
@@ -272,11 +273,15 @@ document.getElementById('batchUploadForm').addEventListener('submit', async func
formData.append('images', img);
});
// An Server senden
try {
const csrfToken = document.querySelector('meta[name="csrf-token"]').getAttribute('content');
const response = await fetch('/upload_csv_batch', {
method: 'POST',
body: formData
body: formData,
headers: {
'X-CSRFToken': csrfToken
}
});
const result = await response.json();