0
的BigCommerce API documentation表明,图像文件可以通过API进行上传,而无需在其他地方先上传:附加图片文件到的Bigcommerce产品
POST /catalog/products/{product_id}/images
在产品创建的图像。公开访问的URL和文件(表格后)有效参数
重点煤矿。我的尝试,在下面的变化,主要回来422 image_url must be present if uploading by url
。
curl -X POST \
https://api.bigcommerce.com/stores/redacted/v3/catalog/products/123/images \
-H 'accept: application/json' \
-H 'cache-control: no-cache' \
-H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
-H 'x-auth-client: redacted' \
-H 'x-auth-token: redacted' \
-F [email protected]_123.jpg \
-F image_url=image_123.jpg
什么是一个正确的形成要求的样子,那POST
S上的图像文件的产品?