@@ -260,6 +260,40 @@ def upload_metadata(connector, client, datasetid, metadata):
260260 verify = connector .ssl_verify if connector else True )
261261 result .raise_for_status ()
262262
263+ def upload_thumbnail (connector , host , key , datasetid , thumbnailid ):
264+ """Upload thumbnail to Clowder.
265+
266+ Keyword arguments:
267+ connector -- connector information, used to get missing parameters and send status updates
268+ host -- the clowder host, including http and port, should end with a /
269+ key -- the secret key to login to clowder
270+ datasetid -- the dataset that the thumbnail should be associated with
271+ thumbnailid -- the file containing the thumbnail
272+ """
273+ logger = logging .getLogger (__name__ )
274+ logger .info ("Upload thumbnails to datasets is not available in V1" )
275+
276+
277+ def upload_preview (connector , host , key , datasetid , previewfile , previewmetadata = None , preview_mimetype = None ,
278+ visualization_name = None , visualization_description = None , visualization_config_data = None ,
279+ visualization_component_id = None ):
280+ """Upload preview to Clowder.
281+
282+ Keyword arguments:
283+ connector -- connector information, used to get missing parameters and send status updates
284+ host -- the clowder host, including http and port, should end with a /
285+ key -- the secret key to login to clowder
286+ datasetid -- the dataset that is currently being processed
287+ previewfile -- the file containing the preview
288+ previewmetadata -- any metadata to be associated with preview, can contain a section_id
289+ to indicate the section this preview should be associated with.
290+ preview_mimetype -- (optional) MIME type of the preview file. By default, this is obtained from the
291+ file itself and this parameter can be ignored. E.g. 'application/vnd.clowder+custom+xml'
292+ """
293+
294+ logger = logging .getLogger (__name__ )
295+ logger .info ("Upload preview to datasets is not available in V1" )
296+
263297
264298# TODO not done yet, need more testing
265299class DatasetsApi (object ):
0 commit comments