mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
fix #I8AXL6 [app_ai_media]当前在网页不生效,要能将图转本地
This commit is contained in:
@@ -149,7 +149,9 @@ def get_image_url2attachment(url):
|
||||
if not url:
|
||||
return None
|
||||
try:
|
||||
response = requests.get(url, timeout=5)
|
||||
if url.startswith('//'):
|
||||
url = 'https:%s' % url
|
||||
response = requests.get(url, timeout=30)
|
||||
except Exception as e:
|
||||
return None, None
|
||||
# 返回这个图片的base64编码
|
||||
|
||||
Reference in New Issue
Block a user