Receive form-data in function add

Marco Hernandez2 years ago

I want to register a file, which is sent from postman with the data type body/form-data. To receive this data I read that I require a @FormDataParam, when adding the libraries and running the server I get this error
image error

Does anyone know the reason for the error?

This is my build.gradle where i add the dependency

dependencies {
    implementation "com.sun.jersey.contribs:jersey-multipart:1.18.2"
...
}

and this is my method where i used the @FormDataParam

import com.sun.jersey.multipart.FormDataParam;
....
public Response add(@FormDataParam("name") String name,@FormDataParam("uniqueId") String uniqueId) throws StorageException {
....
}