Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
周伟奇
/
bmw-ocr
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
b4009530
authored
2020-11-08 13:17:16 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
add remove tmp file
1 parent
d6a270fd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
src/apps/doc/views.py
src/apps/doc/views.py
View file @
b400953
...
...
@@ -285,10 +285,12 @@ class DocView(GenericView, DocHandler):
try
:
file
=
fitz
.
Document
(
tmp_save_path
)
except
Exception
as
e
:
os
.
remove
(
tmp_save_path
)
raise
self
.
invalid_params
(
msg
=
'invalid params: not a PDF file'
)
else
:
if
not
file
.
isPDF
:
file
.
close
()
os
.
remove
(
tmp_save_path
)
raise
self
.
invalid_params
(
msg
=
'invalid params: not a PDF file'
)
file
.
close
()
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment