I am using Jersey to upload file. I defined the method:
@POST
@Path(\"/upload\")
@Consumes(\"multipart/form-data\")
public Collection uploadIm
Thanks @john 4d5 People please ensure that all the jars version are in sync You can find all the possible jars here. :) https://maven.java.net/index.html#welcome
You need to add Maven dependencies related to Multipart handling.
<dependency> <!-- choose your version -->
<groupId>org.jvnet</groupId>
<artifactId>mimepull</artifactId>
<version>1.6</version>
</dependency>
<dependency> <!-- choose your version -->
<groupId>com.sun.jersey.contribs</groupId>
<artifactId>jersey-multipart</artifactId>
<version>1.18.1</version>
</dependency>
If you need check http://mvnrepository.com/ for the versions of the dependencies for your Jersey version.
Make sure all libs are the same version (e.g. 1.13), and don't forget to add mimepull.jar and jersey-multipart.jar as well.