From 44b6ec25a2fc5e6f67790aa9e1b335d7444b6a8e Mon Sep 17 00:00:00 2001 From: ManishMadan2882 Date: Wed, 11 Jun 2025 21:18:37 +0530 Subject: [PATCH] clean --- application/api/internal/routes.py | 4 ++-- application/api/user/routes.py | 1 - application/worker.py | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/application/api/internal/routes.py b/application/api/internal/routes.py index 2f60d8ea..435b9cf4 100755 --- a/application/api/internal/routes.py +++ b/application/api/internal/routes.py @@ -49,7 +49,7 @@ def upload_index_files(): remote_data = request.form["remote_data"] if "remote_data" in request.form else None sync_frequency = request.form["sync_frequency"] if "sync_frequency" in request.form else None - original_file_path = request.form.get("original_file_path") # Already sanitized path + original_file_path = request.form.get("original_file_path") storage = StorageCreator.get_storage() index_base_path = f"indexes/{id}" @@ -106,7 +106,7 @@ def upload_index_files(): "retriever": retriever, "remote_data": remote_data, "sync_frequency": sync_frequency, - "file_path": original_file_path, ## relative path to the original file, for the storage referrence + "file_path": original_file_path, } ) return {"status": "ok"} diff --git a/application/api/user/routes.py b/application/api/user/routes.py index dbcc751e..e65b7891 100644 --- a/application/api/user/routes.py +++ b/application/api/user/routes.py @@ -3454,7 +3454,6 @@ class StoreAttachment(Resource): jsonify({"status": "error", "message": "Missing file"}), 400, ) - # Apply safe_filename to user ID user = safe_filename(decoded_token.get("sub")) try: diff --git a/application/worker.py b/application/worker.py index a73bd8f3..85265308 100755 --- a/application/worker.py +++ b/application/worker.py @@ -290,7 +290,7 @@ def ingest_worker( "retriever": retriever, "id": str(id), "type": "local", - "original_file_path": source_file_path, # Pass the original file path + "original_file_path": source_file_path, } upload_index(vector_store_path, file_data)