ImageURL在特定时间后过期

问题描述 投票:0回答:1

我具有一组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。一段时间后,它过期了。

FYI,

ImageURL: https://carsales.pxcrush.net/car/dealer/y67p1dpz5f7zc3swhxi93ur9e.jpg?pxc_expires=20191203040935&pxc_clear=1&pxc_size=2500,2500&pxc_method=limit&pxc_signature=db8a850b8401d95b37fa3658a2fcbb5e

Getting base64 from ImageURL

image base64 wso2ei imageurl
1个回答
0
投票

即使您直接通过浏览器访问URL,似乎也会打印错误消息。是不是

我将“ pxc_expires”查询参数更改为较新的一个“ pxc_expires = 20191226040935”。现在我得到了另一个错误。

错误签名

然后,我完全删除了“ pxc_signature = db8a850b8401d95b37fa3658a2fcbb5e”,然后就可以检索该图像了。

您确定要从正确的URL访问图像吗?我认为,使用正确的图片网址可以解决问题。

© www.soinside.com 2019 - 2024. All rights reserved.