File upload
Description: extension for uploading files with use FileRepository implementation
Maven module:
OpenHub's extensions are under construction, it's coming soon ...
<groupId>org.openhubframework.openhub.extensions</groupId> <artifactId>file-upload</artifactId>
Package: org.openhubframework.openhub.extension.fileupload
Route | UploadFileRoute | |||||||||
IN/OUT | IN | |||||||||
URL | .../http/upload | |||||||||
Description | File is uploaded via PUT HTTP method. Input file is uploaded to temporary directory with unique file identifier (fileId) that is returned back.
curl -i -X PUT -T "/Volumes/Obelix/context.xml" http://localhost:8080/esb/http/... | |||||||||
Configuration |
web.xml: <!-- Camel servlet--> <servlet> <servlet-name>CamelServlet</servlet-name> <servlet-class>org.apache.camel.component.servlet.CamelHttpTransportServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>CamelServlet</servlet-name> <url-pattern>/http/*</url-pattern> </servlet-mapping> | |||||||||
Error codes | See ErrorFileUploadEnum
| |||||||||
Prerequisites | File upload uses FileRepository contract and therefore it's necessary to inicialize FileRepository's implementations. <bean id="fileRepository" class="org.openhubframework.openhub.core.common.file.DefaultFileRepository"/> DefaultFileRepository uses ohf.dir.temp and ohf.dir.fileRepository configuration properties, see Configuration page for more details. | |||||||||
Notes |