Downloading files from Alfresco with MuleSoft CMIS connector

元气小坏坏 提交于 2019-12-07 15:32:28

Ok i solved the problem. Basically the best way to do this is to change the flow to this:

    <set-payload value ="#[payload.getContentStream()]" />

    <set-variable value="#[payload.getMimeType()]" variableName="mime" doc:name="Variable" />
    <set-variable value="#[payload.getFileName()]" variableName="name" doc:name="Variable" />

    <!-- Set Content-Type to stored mimetype -->        
    <set-property value="#[flowVars['mime']]" propertyName="Content-Type" />
    <set-property propertyName="File-Name" value="#[flowVars['name']]"/>
    <set-property value="attachment; filename=#[flowVars['name']]" propertyName="Content-Disposition" />

this should be in the Mule Flow after

This takes mime type and file name from the payload and returns it!

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!