Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Martin Mareš
Postal Owl
Commits
43a60ed7
Commit
43a60ed7
authored
Oct 19, 2021
by
Martin Mareš
Browse files
Allow PDF 2.x
parent
3110863b
Changes
1
Hide whitespace changes
Inline
Side-by-side
owl.py
View file @
43a60ed7
...
...
@@ -386,7 +386,7 @@ def validate_attachment(form, field):
def
is_pdf
(
f
):
f
.
seek
(
0
)
header
=
f
.
read
(
9
)
return
len
(
header
)
==
9
and
header
[:
7
]
==
b
'%PDF-1.'
return
len
(
header
)
==
9
and
(
header
[:
7
]
==
b
'%PDF-1.'
or
header
[:
7
]
==
b
'%PDF-2.'
)
def
is_utf8
(
f
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment