mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-06 21:01:59 +02:00
SketchfabUpload: log correct file size and fix spaces in tags
This commit is contained in:
parent
d661a2b928
commit
95a28cb0a7
1 changed files with 2 additions and 4 deletions
|
@ -232,7 +232,7 @@ class SketchfabUpload(desc.Node):
|
||||||
if len(chunk.node.description.value) > 1024:
|
if len(chunk.node.description.value) > 1024:
|
||||||
chunk.logger.error('Description cannot be longer than 1024 characters.')
|
chunk.logger.error('Description cannot be longer than 1024 characters.')
|
||||||
raise RuntimeError()
|
raise RuntimeError()
|
||||||
tags = [ i.value for i in chunk.node.tags.value.values() ]
|
tags = [ i.value.replace(' ', '-') for i in chunk.node.tags.value.values() ]
|
||||||
if all(len(i) > 48 for i in tags) and len(tags) > 0:
|
if all(len(i) > 48 for i in tags) and len(tags) > 0:
|
||||||
chunk.logger.error('Tags cannot be longer than 48 characters.')
|
chunk.logger.error('Tags cannot be longer than 48 characters.')
|
||||||
raise RuntimeError()
|
raise RuntimeError()
|
||||||
|
@ -264,9 +264,7 @@ class SketchfabUpload(desc.Node):
|
||||||
zf.close()
|
zf.close()
|
||||||
chunk.logger.debug('Files added to zip: {}'.format(str(files)))
|
chunk.logger.debug('Files added to zip: {}'.format(str(files)))
|
||||||
chunk.logger.debug('Created {}'.format(uploadFile))
|
chunk.logger.debug('Created {}'.format(uploadFile))
|
||||||
|
chunk.logger.info('File size: {}MB'.format(round(os.path.getsize(uploadFile)/(1024*1024), 3)))
|
||||||
fileSize = os.path.getsize(uploadFile)/1000000
|
|
||||||
chunk.logger.info('File size: {}MB'.format(fileSize))
|
|
||||||
|
|
||||||
self.upload(chunk.node.apiToken.value, uploadFile, data, chunk)
|
self.upload(chunk.node.apiToken.value, uploadFile, data, chunk)
|
||||||
chunk.logger.info('Upload successful. Your model is being processed on Sketchfab. It may take some time to show up on your "models" page.')
|
chunk.logger.info('Upload successful. Your model is being processed on Sketchfab. It may take some time to show up on your "models" page.')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue