diff --git a/Web/app.py b/Web/app.py index 8041ed2..7541c85 100755 --- a/Web/app.py +++ b/Web/app.py @@ -11864,6 +11864,7 @@ def batch_upload_page(): @app.route('/upload_csv_batch', methods=['POST']) +@csrf.exempt def upload_csv_batch(): """ Route for batch adding new items to the inventory via CSV. @@ -11903,7 +11904,7 @@ def upload_csv_batch(): # 2. CSV Einlesen und Validieren try: - df = pd.read_csv(csv_file) + df = pd.read_csv(csv_file, sep=';') except Exception as e: app.logger.error(f"[Upload {upload_session_id}] Fehler beim Lesen der CSV: {str(e)}") return jsonify({"success": False, "message": f"Fehler beim Lesen der CSV: {str(e)}"}), 400 diff --git a/Web/templates/upload_batch.html b/Web/templates/upload_batch.html index b998285..9f37a79 100644 --- a/Web/templates/upload_batch.html +++ b/Web/templates/upload_batch.html @@ -221,7 +221,7 @@ document.getElementById('batchUploadForm').addEventListener('submit', async func log(`${uniqueDataRows.length} einzigartige Einträge gefunden. ${duplicateCount} Duplikate entfernt.`); // Den Index der "Images" Spalte finden - const headers = header.split(','); + const headers = header.split(';'); const imagesColIndex = headers.findIndex(h => h.trim().replace(/['"]/g, '') === 'Images'); // 4. In Batches (Häppchen) aufteilen