Source Code : upload file to dropbox programatically

 to upload a file to dropbox programatically.

Basically file can be uploaded through dropbox api. But the question is how could i upload it by java rest based web service. The program to get the file is:


@Path("/file") public class UploadFile {

@POST
@Path("/upload")
@Consumes(MediaType.MULTIPART_FORM_DATA)
public Response uploadFile(
  @FormDataParam("file") InputStream uploadedInputStream,
  @FormDataParam("file") FormDataContentDisposition fileDetail) {

  Stringfilename = fileDetail.getFileName();
  .
  .
  .
  }
}