diff --git a/setup.py b/setup.py index 72fc28c..8226e88 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup( name = "thirdlight", - version = "0.1.1", + version = "0.1.2", author = "ReThought Ltd", author_email = "code@rethought-solutions.com", url = "https://github.com/Rethought/thirdlight.git", diff --git a/src/thirdlight.py b/src/thirdlight.py index da0e577..332795a 100644 --- a/src/thirdlight.py +++ b/src/thirdlight.py @@ -252,9 +252,19 @@ def upload_image(self, source, folderId=None, folderPath=None, caption="", if folderId is None: folderId = self.resolve_folder_id(folderPath) - response = self.Upload_CreateUpload(params=dict(destination=folderId, - synchronous=False, - lifetime=60)) + edit_md = dict( + caption='OPTIONAL', + keywords='OPTIONAL' + ) + for key in extra_meta: + edit_md.update({key: 'OPTIONAL'}) + + response = self.Upload_CreateUpload(params=dict( + destination=folderId, + synchronous=False, + lifetime=60, + editablemetadata=edit_md + )) uploadKey = response.uploadKey # get the file base64 encoded - we'll look to sort out the big file