문제

I write a simple REST API that accept files attached to a POST call. I'm able to write the file to the filesystem using VFS:FILE as endpoint <address uri="vfs:file://c:\\wso2\filesend\\"/>, but the API has two parameter defined in the API uri-template="/{symbol}/{value}, so the passed file is stored in sub-dir c:\wso2\filesend\{symbol}\{value}\ not in the c:\wso2\filesend\ as I wont. I've tried to manipulate URL with rewrite mediator but it doesn't work with VFS. Any suggestion how-to obtain desidered result? Thnks in advance

도움이 되었습니까?

해결책

I resolve it. Instead using rewrite mediator I obtain the desired result changing REST_URL_POSTFIX property (e.g. <property name="REST_URL_POSTFIX" expression="fn:concat('/',get-property('uri.var.value'))" scope="axis2"> ). VFS now write my file in c:\wso2\filesend\{value}

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top