mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-10 08:37:19 +01:00
bugfix
This commit is contained in:
parent
d7a0848a91
commit
1b0233418b
1 changed files with 3 additions and 0 deletions
|
|
@ -32,6 +32,9 @@ class UploadForm(forms.Form):
|
||||||
|
|
||||||
t = int(mktime(datetime.now().timetuple()))
|
t = int(mktime(datetime.now().timetuple()))
|
||||||
|
|
||||||
|
os.makedirs(settings.SCRATCH_DIR, exist_ok=True)
|
||||||
|
|
||||||
|
# TODO: dont just append pdf. This is here for taht weird regex check at the start of the consumer.
|
||||||
with tempfile.NamedTemporaryFile(prefix="paperless-upload-", suffix=".pdf", dir=settings.SCRATCH_DIR, delete=False) as f:
|
with tempfile.NamedTemporaryFile(prefix="paperless-upload-", suffix=".pdf", dir=settings.SCRATCH_DIR, delete=False) as f:
|
||||||
|
|
||||||
f.write(document)
|
f.write(document)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue