Created
November 27, 2014 20:09
-
-
Save iamedu/5f8332cb47be3ecb048e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.ws.rs.Consumes | |
import javax.ws.rs.POST | |
import javax.ws.rs.core.MediaType | |
import org.glassfish.jersey.media.multipart.FormDataContentDisposition | |
import org.glassfish.jersey.media.multipart.FormDataParam | |
@POST | |
@Consumes(MediaType.MULTIPART_FORM_DATA) | |
public Response uploadFile(@FormDataParam("file") InputStream is, @FormDataParam("file") FormDataContentDisposition data) { | |
println data | |
println is | |
simpleOk() | |
} | |
============= | |
/contents: | |
/{id}/media: | |
post: | |
body: | |
multipart/form-data: | |
formParameters: | |
file: | |
type: file | |
required: true | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment