【问题标题】:ImageURL got expired after some particular timeImageURL 在某个特定时间后过期
【发布时间】:2020-04-15 08:12:41
【问题描述】:

我有一组需要转换为 base64 的 URL,以便将图像推送到 WSO2 EI 6.3.0 中的 Salesforce 文件对象。在将 imageUrl 转换为 base64 时,我收到 "expires" value too old 消息。 这是我的代码。 `

                                         <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。一段时间后它会过期。

仅供参考,

图片网址: 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】:

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

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

    错误的签名

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

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

    【讨论】:

    • 嗨@Arunan,感谢您的回复。相同的网址在一段时间(大约 20 天前)之前运行良好。我认为使用 pxc_expires 值使图像过期。所以 ImageURL 没有变化。如果您有任何其他解决方案,请告诉我。
    • 正如我提到的,这不是EI方面的问题。
    猜你喜欢
    • 2020-09-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-08-25
    • 2020-12-08
    • 2020-08-14
    相关资源
    最近更新 更多