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
35dc3f45
authored
2025-04-08 14:52:57 +0800
by
冯轩
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
MOD:api
1 parent
33a3d92e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
src/apps/doc/views.py
src/apps/doc/views.py
View file @
35dc3f4
...
...
@@ -1940,16 +1940,18 @@ class SearchGBHistoryFileView(GenericView):
return
response
.
ok
(
data
=
True
)
class
DownloadGBHistoryFileView
(
GenericView
):
permission_classes
=
[
IsAuthenticated
]
authentication_classes
=
[
OAuth2AuthenticationWithUser
]
#
permission_classes = [IsAuthenticated]
#
authentication_classes = [OAuth2AuthenticationWithUser]
@use_args
(
d_gb_file_args
,
location
=
'data'
)
def
post
(
self
,
request
,
args
):
try
:
business_type
=
args
.
get
(
'business_type'
)
object_id
=
args
.
get
(
'object_id'
)
save_path
=
args
.
get
(
'save_path'
)
ecm
=
ECM
()
ecm
.
download
(
save_path
,
object_id
,
'green_book'
,
business_type
)
self
.
running_log
.
info
(
'[DownloadGBHistoryFileView] [args={0}] '
.
format
(
args
))
return
response
.
ok
(
data
=
True
)
except
Exception
as
e
:
return
response
.
ok
(
data
=
False
)
\ No newline at end of file
...
...
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