Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

Add rate limiting to collection upload endpoint (#1892)

LearningCircuite4d04407b44b
diff --git a/src/local_deep_research/research_library/routes/rag_routes.py b/src/local_deep_research/research_library/routes/rag_routes.py
index 221efb5804..70ead3e23c 100644
--- a/src/local_deep_research/research_library/routes/rag_routes.py
+++ b/src/local_deep_research/research_library/routes/rag_routes.py
@@ -35,6 +35,7 @@ from ...utilities.db_utils import get_settings_manager
from ..services.library_rag_service import LibraryRAGService
from ...web.services.settings_manager import SettingsManager
from ...security.path_validator import PathValidator
+from ...security import upload_rate_limit
from ..utils import handle_api_error
from ...database.models.library import (
Document,
@@ -1382,6 +1383,7 @@ def delete_collection(collection_id):
"/api/collections/<string:collection_id>/upload", methods=["POST"]
)
@login_required
+@upload_rate_limit
def upload_to_collection(collection_id):
"""Upload files to a collection."""
from ...database.session_context import get_user_db_session