fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Minor upgrades.
[redakcja.git]
/
src
/
catalogue
/
ebook_utils.py
diff --git
a/src/catalogue/ebook_utils.py
b/src/catalogue/ebook_utils.py
index
a61d18f
..
c3e8b68
100644
(file)
--- a/
src/catalogue/ebook_utils.py
+++ b/
src/catalogue/ebook_utils.py
@@
-26,7
+26,7
@@
def serve_file(file_path, name, mime_type):
response = HttpResponse(content_type=mime_type)
response['Content-Disposition'] = 'attachment; filename=%s' % name
- with open(file_path) as f:
+ with open(file_path
, 'rb'
) as f:
for chunk in read_chunks(f):
response.write(chunk)
return response