我有一组URL,这些URL需要转换为base64才能将图像推送到WSO2 EI 6.3.0中的Salesforce File对象。将imageUrl转换为base64时,我收到“ expires”值太旧的消息。 这是我的代码。 `
<call>
<endpoint>
<http method="get" uri-template="{uri.var.url}"/>
</endpoint>
</call>
<log level="full" seperator="====Base64Content===="/>
<enrich description="EnrichFileContent">
<source clone="true" type="body"/>
<target property="image_val" type="property"/>
</enrich>
<log level="custom">
<property name="===image_val===" expression="get-property('image_val')"/>
</log>
`
我非常确定我的代码中没有问题。因为通过使用相同的代码,我可以从以前有效的相同URL中检索base64。一段时间后,它过期了。
仅供参考,
答案 0 :(得分:1)
即使您通过浏览器直接访问URL,似乎也正在打印错误消息。是不是
我将“ pxc_expires”查询参数更改为更新的一个“ pxc_expires = 20191226040935”。现在我得到了另一个错误。
签名错误
然后,我完全删除了“ pxc_signature = db8a850b8401d95b37fa3658a2fcbb5e”,然后就可以检索该图像了。
确定要从正确的URL访问图像吗?我认为,使用正确的图片网址可以解决问题。