fix of the json upload format
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user