WooCommerce REST API。从另一台服务器上传WebP文件时校验和错误
我正在向WooCommerce REST API发送邮政请求,以创建具有图像的产品( https://cdn.beymen.com/productimages/opfgmmmg.0cz_img_01_21100856666379.jpg )看到它实际上是WebP
文件)。
当我上传另一个以WebP
结尾的WebP映像时,它正在工作。但是,当我将URL上传到上方时,我会发现此错误。
{'code':'woocommerce_product_image_upload_error','消息':'„„„ woocommerce_image_image_upload_error':'„„„„ woocommerce_image_image_upload_error':'„„„„ woocommerce_image_image_upload_error':'。 https://cdn.beymen.com/productimages/opfgmmmg.0cz_img_01_2110085666379.jpg。 →函数(4572785D201F809BCDC2A9B7BF82E305)的校验和不匹配预期的校验和值(feb886e9d82201b5189e121d121d121da761451d)。
I am sending a post request to woocommerce REST API to create a product with an image on it (https://cdn.beymen.com/productimages/opfgmmmg.0cz_IMG_01_2110085666379.jpg) (the extension of the file in the url is jpg
but when you download it you can see that it is actually webP
file).
When I upload another webP images that actually ends with webp
it is working. but when I am uploading the url above I am gettin this error.
{'code': 'woocommerce_product_image_upload_error', 'message': 'Ошибка дистанционного получения изображения https://cdn.beymen.com/productimages/opfgmmmg.0cz_IMG_01_2110085666379.jpg. Ошибка: The checksum of the file (4572785d201f809bcdc2a9b7bf82e305) does not match the expected checksum value (feb886e9d82201b5189e121da761451d).', 'data': {'status': 400}}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用以下片段来修复它
You can fix it using the following snippet