Skip to content

Commit

Permalink
Use the provided mimetype in B2FileList.upload.
Browse files Browse the repository at this point in the history
  • Loading branch information
Katharine committed Jan 15, 2019
1 parent 5976bde commit ac70185
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion b2blaze/models/file_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,8 @@ def upload(self, contents, file_name, mime_content_type=None, content_length=Non
auth_token = upload_url_response.json().get('authorizationToken', None)
upload_response = self.connector.upload_file(file_contents=contents, file_name=file_name,
upload_url=upload_url, auth_token=auth_token,
content_length=content_length, progress_listener=progress_listener)
content_length=content_length, progress_listener=progress_listener,
mime_content_type=mime_content_type)
if upload_response.status_code == 200:
new_file = B2File(connector=self.connector, parent_list=self, **upload_response.json())
# Update file list after upload
Expand Down

0 comments on commit ac70185

Please sign in to comment.