mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-29 08:33:20 +00:00
clean
This commit is contained in:
@@ -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"}
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user