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
c92de6e5
Commit
c92de6e5
authored
Aug 06, 2015
by
Jan Broer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix filename of book download (was pre- and suffixed with single quotes)
parent
6e26c081
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
web.py
cps/web.py
+1
-1
No files found.
cps/web.py
View file @
c92de6e5
...
@@ -289,7 +289,7 @@ def get_download_link(book_id, format):
...
@@ -289,7 +289,7 @@ def get_download_link(book_id, format):
data
=
db
.
session
.
query
(
db
.
Data
)
.
filter
(
db
.
Data
.
book
==
book
.
id
)
.
filter
(
db
.
Data
.
format
==
format
.
upper
())
.
first
()
data
=
db
.
session
.
query
(
db
.
Data
)
.
filter
(
db
.
Data
.
book
==
book
.
id
)
.
filter
(
db
.
Data
.
format
==
format
.
upper
())
.
first
()
helper
.
update_download
(
book_id
,
int
(
current_user
.
id
))
helper
.
update_download
(
book_id
,
int
(
current_user
.
id
))
response
=
make_response
(
send_from_directory
(
os
.
path
.
join
(
config
.
DB_ROOT
,
book
.
path
),
data
.
name
+
"."
+
format
))
response
=
make_response
(
send_from_directory
(
os
.
path
.
join
(
config
.
DB_ROOT
,
book
.
path
),
data
.
name
+
"."
+
format
))
response
.
headers
[
"Content-Disposition"
]
=
"attachment; filename=
'
%
s.
%
s'
"
%
(
data
.
name
,
format
)
response
.
headers
[
"Content-Disposition"
]
=
"attachment; filename=
%
s.
%
s
"
%
(
data
.
name
,
format
)
return
response
return
response
@
app
.
route
(
'/login'
,
methods
=
[
'GET'
,
'POST'
])
@
app
.
route
(
'/login'
,
methods
=
[
'GET'
,
'POST'
])
...
...
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