我在系统里创建了一个product,id为I043416, 描述信息为Mini Cooper:
图片信息在Attachment区域:
使用一个OData服务读取该产品的明细包括图片信息。因为对数据是只读操作,故不需要额外的请求去获取csrf token.
请求url:https://xxx/sap/c4c/odata/v1/c4codata/ProductCollection?expand=ProductAttachment
其中$filter=ID和&expand之间的值,实际是 eq 'I043416' 进行url encode后的值。
其中产品图片的二进制内容,以Base64的格式存储在节点ProductAttachment->Binary里。
要获取更多Jerry的原创文章,请关注公众号"汪子熙":
网友评论