mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-11-21 04:52:40 +00:00
Fix: create the scratch dir before zone OCR renders into it
This commit is contained in:
1 parent
5182b719c5
commit
0348dc532f
2 files changed
+3
No files matched your search
@@ -5926,6 +5926,7 @@ class OcrTemplateViewSet(BulkPermissionMixin, PassUserMixin, ModelViewSet[OcrTem
|
||||
content_type=file_doc.mime_type,
|
||||
)
|
||||
|
||||
settings.SCRATCH_DIR.mkdir(parents=True, exist_ok=True)
|
||||
with tempfile.TemporaryDirectory(dir=settings.SCRATCH_DIR) as tmp_dir:
|
||||
rendered = Path(tmp_dir) / "page.png"
|
||||
try:
|
||||
|
||||
Reference in new issue
Block a user