Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
douban-api-proxy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
captainwong
douban-api-proxy
Commits
0c9eacb0
Commit
0c9eacb0
authored
Mar 06, 2017
by
林檎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix opds
parent
e845bdbd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
web.py
cps/web.py
+2
-2
No files found.
cps/web.py
View file @
0c9eacb0
...
...
@@ -673,9 +673,9 @@ def get_opds_download_link(book_id, format):
file_name
=
book
.
title
if
len
(
book
.
authors
)
>
0
:
file_name
=
book
.
authors
[
0
]
.
name
+
'-'
+
file_name
#
file_name = helper.get_valid_filename(file_name)
file_name
=
helper
.
get_valid_filename
(
file_name
)
response
=
make_response
(
send_from_directory
(
os
.
path
.
join
(
config
.
config_calibre_dir
,
book
.
path
),
data
.
name
+
"."
+
format
))
response
.
headers
[
"Content-Disposition"
]
=
"attachment; filename=
\"
%
s.
%
s
\"
"
%
(
data
.
name
,
format
)
response
.
headers
[
"Content-Disposition"
]
=
"attachment; filename=
\"
%
s.
%
s
\"
"
%
(
urllib
.
quote
(
file_name
.
encode
(
'utf8'
))
,
format
)
return
response
...
...
Write
Preview
Markdown
is supported
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