示例#1
0
def force_thumbnail(link, image_data, never_expire=True, file_type=".jpg"):
    image = str_to_image(image_data)
    image = prepare_image(image)
    thumb_url = upload_media(image,
                             never_expire=never_expire,
                             file_type=file_type)
    update_link(link,
                thumbnail=thumb_url,
                media_object=None,
                thumbnail_size=image.size)
示例#2
0
def force_thumbnail(link, image_data, never_expire=True):
    image = str_to_image(image_data)
    image = prepare_image(image)
    upload_thumb(link, image, never_expire=never_expire)
    update_link(link, thumbnail=True, media_object=None)
示例#3
0
文件: media.py 项目: Krenair/reddit
def force_thumbnail(link, image_data, never_expire=True, file_type=".jpg"):
    image = str_to_image(image_data)
    image = prepare_image(image)
    thumb_url = upload_media(image, never_expire=never_expire, file_type=file_type)
    update_link(link, thumbnail=thumb_url, media_object=None, thumbnail_size=image.size)
示例#4
0
def force_thumbnail(link, image_data, never_expire = True):
    image = str_to_image(image_data)
    image = prepare_image(image)
    upload_thumb(link, image, never_expire = never_expire)
    update_link(link, thumbnail = True, media_object = None)