mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-14 18:46:52 +01:00
FileType does not care about the extension anymore.
This commit is contained in:
parent
41650f20f4
commit
3d5b66c2b7
4 changed files with 118 additions and 164 deletions
|
|
@ -34,8 +34,7 @@ class UploadForm(forms.Form):
|
|||
|
||||
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-", dir=settings.SCRATCH_DIR, delete=False) as f:
|
||||
|
||||
f.write(document)
|
||||
os.utime(f.name, times=(t, t))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue