mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-01-26 10:11:51 +01:00
Fixed downloading mobi from fdown
This commit is contained in:
parent
783a614345
commit
fe557bbce5
1 changed files with 4 additions and 0 deletions
4
main.py
4
main.py
|
|
@ -115,6 +115,10 @@ class FileServer(webapp.RequestHandler):
|
|||
elif fanfic.format == 'text':
|
||||
self.response.headers['Content-Type'] = 'text/plain'
|
||||
self.response.headers['Content-disposition'] = 'attachment; filename=' +name + '.txt.zip'
|
||||
elif fanfic.format == 'mobi':
|
||||
self.response.headers['Content-Type'] = 'application/x-mobipocket-ebook'
|
||||
self.response.headers['Content-disposition'] = 'attachment; filename=' + name + '.mobi'
|
||||
|
||||
|
||||
self.response.out.write(fanfic.blob)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue