fix: remove manual Content-Type setting for CSV import to ensure proper form data handling
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 51s
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 51s
This commit is contained in:
@@ -2206,11 +2206,9 @@ export default {
|
||||
formData.append('clubId', this.currentClub);
|
||||
|
||||
try {
|
||||
const response = await apiClient.post('/matches/import', formData, {
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
});
|
||||
// Let the browser add the multipart boundary. Setting Content-Type manually
|
||||
// drops it and prevents Multer from reading form fields such as clubId.
|
||||
const response = await apiClient.post('/matches/import', formData);
|
||||
if (response.status < 200 || response.status >= 300) {
|
||||
throw new Error(response.data?.error || 'Failed to import CSV data');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user