diff --git a/CHANGELOG.md b/CHANGELOG.md index 7111604..7c239c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/) and this project adheres to [Semantic Versioning](https://semver.org/). -## 3.0.3 - 2023-08-29 +## 3.0.4 - 2023-09-27 + +### Fixed + +- Fixed host bug on v1 file thumbnail endpoint. +- +- ## 3.0.3 - 2023-08-29 ### Added diff --git a/pyclowder/api/v1/files.py b/pyclowder/api/v1/files.py index 39caef6..7ffd9ae 100644 --- a/pyclowder/api/v1/files.py +++ b/pyclowder/api/v1/files.py @@ -295,7 +295,7 @@ def upload_thumbnail(connector, client, fileid, thumbnail): """ logger = logging.getLogger(__name__) - url = client.host + 'api/fileThumbnail?key=' + client.key + url = '%s/api/fileThumbnail?key=%s' % (client.host, client.key) # upload preview with open(thumbnail, 'rb') as inputfile: @@ -303,10 +303,10 @@ def upload_thumbnail(connector, client, fileid, thumbnail): thumbnailid = result.json()['id'] logger.debug("thumbnail id = [%s]", thumbnailid) - # associate uploaded preview with orginal file/dataset + # associate uploaded preview with original file/dataset if fileid: headers = {'Content-Type': 'application/json'} - url = client.host + 'api/files/' + fileid + '/thumbnails/' + thumbnailid + '?key=' + client.key + url = '%s/api/files/%s/thumbnails/%s?key=%s' % (client.host, fileid, thumbnailid, client.key) connector.post(url, headers=headers, data=json.dumps({}), verify=connector.ssl_verify if connector else True) return thumbnailid diff --git a/setup.py b/setup.py index e0a6af3..31b0ad6 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setup( name='pyclowder', - version='3.0.3', + version='3.0.4', description='Python SDK for the Clowder Data Management System', long_description=long_description,