mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-12 08:16:06 -07:00
Encode image title for Cloudinary upload
This commit is contained in:
parent
d8cfdea704
commit
a989a53750
1 changed files with 1 additions and 1 deletions
|
@ -793,7 +793,7 @@ def upload_to_cloudinary(img_data, img_title='', rating_key='', fallback=''):
|
||||||
response = upload('data:image/png;base64,{}'.format(base64.b64encode(img_data)),
|
response = upload('data:image/png;base64,{}'.format(base64.b64encode(img_data)),
|
||||||
public_id='{}_{}'.format(fallback, rating_key),
|
public_id='{}_{}'.format(fallback, rating_key),
|
||||||
tags=[fallback, str(rating_key)],
|
tags=[fallback, str(rating_key)],
|
||||||
context={'title': img_title, 'rating_key': str(rating_key), 'fallback': fallback})
|
context={'title': img_title.encode('utf-8'), 'rating_key': str(rating_key), 'fallback': fallback})
|
||||||
logger.debug(u"Tautulli Helpers :: Image '{}' ({}) uploaded to Cloudinary.".format(img_title, fallback))
|
logger.debug(u"Tautulli Helpers :: Image '{}' ({}) uploaded to Cloudinary.".format(img_title, fallback))
|
||||||
img_url = response.get('url', '')
|
img_url = response.get('url', '')
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue