Question

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

Was it helpful?

Solution

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}

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top