Skip to content

Commit

Permalink
fix #19
Browse files Browse the repository at this point in the history
  • Loading branch information
aerickson committed Feb 24, 2018
1 parent 7bb76b3 commit fd2f58e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flask_mailgun/attachment.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def attachment_decorator(f, email, filename):
"""Converts a file back into a FileStorage Object"""
with open(filename, 'r') as file:
attachment = FileStorage(stream=file,
filename=filename.encode('utf-8'))
filename=filename)
result = f(email, attachment)
return result

Expand Down Expand Up @@ -90,7 +90,7 @@ class Attachment(object):

def __init__(self, filename=None, content_type=None, data=None,
disposition=None, headers=None):
self.filename = filename.encode('utf-8')
self.filename = filename
self.content_type = content_type
self.data = data
self.disposition = disposition or 'attachment'
Expand Down

0 comments on commit fd2f58e

Please sign in to comment.