รูปแบบที่เหมาะสมในการจัดเตรียมลิงก์รูปภาพที่เก็บข้อมูลของ Google ในขณะที่ images.insert
ควรเป็นรูปแบบใด ไฟล์รูปภาพอยู่ที่ GS Bucket เป็น *.tar.gz
การสร้างภาพใหม่ด้วยไลบรารีไคลเอนต์ Google ใน python ด้วย api images.insert(body=body,project=project)
การกำหนดค่าร่างกายของฉันดูเหมือนว่า:
body = { "name":"test", "sourceImage":"https://console.cloud.google.com/storage/browser/[BUCKET]/[IMAGEFILE]",}
ขั้นตอนล้มเหลวโดยมีข้อผิดพลาดดังต่อไปนี้:
googleapiclient.errors.HttpError: <HttpError 400 when requesting returned "Invalid value for field 'resource.sourceImage': 'https://storag
e.cloud.google.com/[BUCKET]/[IMAGEFILE]'. The URL is malformed.">