问题描述
如何使用Bigcommerce的Python API(从网络上载)图像?
how do I upload an image (from the web) using Bigcommerce's Python API?
到目前为止,我已经知道了:
I've got this so far:
custom = api.Products.create(name='Test', type='physical', price=8.33, categories=[85], availability='available', weight=0)
谢谢!我已经尝试了几乎所有东西!
Thank you! I've tried almost everything!
推荐答案
这将在BigCommerce网站上创建产品.在创建产品之后,通过输入以下行来创建图像. image_file
标签应为完全合格的URL,指向可在其他网站或您自己的Web服务器上找到的BigCommerce网站可访问的图像.
This will create the product on the BigCommerce website. You create the image after creating the product, by entering the following line. The image_file
tag should be a fully qualified URL pointing to an image that is accessible to the BigCommerce website, being found either on another website or on your own webserver.
api.ProductImages.create(parentid=custom.id, image_file='http://www.evenmore.co.uk/images/emgrab_s.jpg', description='My image description')
这篇关于Bigcommerce Python API,如何创建带有图片的产品?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!