Apa format yang tepat untuk menyediakan tautan gambar penyimpanan Google sementara images.insert
? File gambar terletak di GS Bucket sebagai *.tar.gz
. Membuat gambar baru dengan perpustakaan klien Google dengan python dengan api images.insert(body=body,project=project)
konfigurasi tubuh saya terlihat seperti:
body = { "name":"test", "sourceImage":"https://console.cloud.google.com/storage/browser/[BUCKET]/[IMAGEFILE]",}
Prosedur gagal dengan kesalahan berikut:
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.">