diff --git a/docs/tech-specs/large-document-loading.md b/docs/tech-specs/large-document-loading.md index a50f5514..497d7bce 100644 --- a/docs/tech-specs/large-document-loading.md +++ b/docs/tech-specs/large-document-loading.md @@ -858,7 +858,7 @@ Internally, the SDK detects document size and switches strategy: ```python class Library: - CHUNKED_UPLOAD_THRESHOLD = 10 * 1024 * 1024 # 10MB + CHUNKED_UPLOAD_THRESHOLD = 2 * 1024 * 1024 # 2MB def add_document(self, id, title, kind, content, tags=None, ...): if len(content) < self.CHUNKED_UPLOAD_THRESHOLD: diff --git a/trustgraph-base/trustgraph/api/library.py b/trustgraph-base/trustgraph/api/library.py index cfa55b57..5e6a6c64 100644 --- a/trustgraph-base/trustgraph/api/library.py +++ b/trustgraph-base/trustgraph/api/library.py @@ -18,8 +18,9 @@ from . exceptions import * logger = logging.getLogger(__name__) -# Threshold for switching to chunked upload (10MB) -CHUNKED_UPLOAD_THRESHOLD = 10 * 1024 * 1024 +# Threshold for switching to chunked upload (2MB) +# Lower threshold provides progress feedback and resumability on slower connections +CHUNKED_UPLOAD_THRESHOLD = 2 * 1024 * 1024 # Default chunk size (5MB - S3 multipart minimum) DEFAULT_CHUNK_SIZE = 5 * 1024 * 1024