diff --git a/src/documents/views.py b/src/documents/views.py index c8062f9ca..312409e9e 100644 --- a/src/documents/views.py +++ b/src/documents/views.py @@ -2017,9 +2017,8 @@ class BulkDownloadView(GenericAPIView): settings.SCRATCH_DIR.mkdir(parents=True, exist_ok=True) temp_dir = Path( - tempfile.TemporaryDirectory( + tempfile.mkdtemp( dir=settings.SCRATCH_DIR, - delete=False, ), )