This commit is contained in:
ManishMadan2882
2025-06-11 21:18:37 +05:30
parent 1b84d1fa9d
commit 44b6ec25a2
3 changed files with 3 additions and 4 deletions

View File

@@ -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"}

View File

@@ -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:

View File

@@ -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)