I want to stream video file instead of Downloading it. I tried with the below code. But it is downloading.
@GET
@Path("video")
@Produces(MediaType.APPLICATION_OCTET_STREAM)
public Response video() {
File file = new File("/home/lvaddi/Downloads/demoVideoFile.flv");
ResponseBuilder response = Response.ok(file, MediaType.APPLICATION_OCTET_STREAM);
response.header("Content-Disposition", "filename=videofile.flv");
return response.build();
}