Skip to content

Commit

Permalink
Move output and return outside Image With
Browse files Browse the repository at this point in the history
  • Loading branch information
venusbb committed Jul 20, 2017
1 parent aa8083b commit 8e4e8fb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/preview.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ def png_from_pdf(pdf_endpoint, page_number):
converted = image.convert('png')
converted.save(file=output)

output.seek(0)
output.seek(0)

return {
'filename_or_fp': output,
'mimetype': 'image/png',
}
return {
'filename_or_fp': output,
'mimetype': 'image/png',
}


@preview_blueprint.route("/preview.json", methods=['POST'])
Expand Down

0 comments on commit 8e4e8fb

Please sign in to comment.