def upload_remote_image(self, cdn_path, url):
"""Upload remote image to CDN.
Args:
cdn_path: the name of file storing in CDN
url: the remote image URL
Returns:
return whether it's uploaded.
"""
file_path = wget.download(url)
result = self.upload_local_image(cdn_path, file_path)
os.remove(file_path)
return result
评论列表
文章目录