Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- content_type, _ = mimetypes.guess_type(f.name)
- response = FileResponse(f)
- if content_type:
- response['content-type'] = content_type
- response['content-disposition'] = 'attachment; filename="{}"'.format(receipt.name)
- return response
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement