From 5b95c5202efc0bb48bd81ffaf75b84559a8cd8f2 Mon Sep 17 00:00:00 2001 From: AIIrondev Date: Tue, 4 Aug 2026 21:03:08 +0200 Subject: [PATCH] fix of the json upload format --- Web/app.py | 4 +- Web/templates/upload_batch.html | 349 +++++++++++++------------------- 2 files changed, 138 insertions(+), 215 deletions(-) diff --git a/Web/app.py b/Web/app.py index bbb9f3f..ffca8f4 100755 --- a/Web/app.py +++ b/Web/app.py @@ -18,7 +18,6 @@ Features: """ from flask import Flask, render_template, request, redirect, url_for, session, flash, send_from_directory, get_flashed_messages, jsonify, Response, make_response, send_file, abort -from flask_wtf import csrf from werkzeug.utils import secure_filename from werkzeug.middleware.proxy_fix import ProxyFix from werkzeug.exceptions import HTTPException @@ -11866,7 +11865,6 @@ 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. @@ -11906,7 +11904,7 @@ def upload_csv_batch(): # 2. CSV Einlesen und Validieren try: - df = pd.read_csv(csv_file, sep=';') + 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 2a3dcb6..30df27d 100644 --- a/Web/templates/upload_batch.html +++ b/Web/templates/upload_batch.html @@ -3,163 +3,87 @@ - Batch Upload - CSV & Bilder + Batch Upload + + + + - -
-

Inventar Batch Upload

+
+

Inventar Batch Upload

- -
-
- - -
- -
- - - Du kannst mehrere Bilder markieren (Strg/Cmd gedrückt halten). -
- - - -
- - -
-
Starte Upload...
- -
    +
    +
    + +
    + +
    + + +
    + + +
    + +
    +
    Bereite Upload vor...
    + +
      +