From ac70185a1e16fb3bc7ce6c974b16fdbdbdb5234b Mon Sep 17 00:00:00 2001 From: Katharine Berry Date: Mon, 14 Jan 2019 21:39:27 -0800 Subject: [PATCH] Use the provided mimetype in B2FileList.upload. --- b2blaze/models/file_list.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/b2blaze/models/file_list.py b/b2blaze/models/file_list.py index ecf8c1e..35e43ef 100644 --- a/b2blaze/models/file_list.py +++ b/b2blaze/models/file_list.py @@ -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