OneTimeDownloads oneTimeDownloads;
@GET
@Path("blob/{blobId}")
public Response downloadBlob(@PathParam("blobId") String blobId) {
Download download = oneTimeDownloads.get(blobId);
if (download == null) {
throw new WebApplicationException(Status.NOT_FOUND);
}
String responseData = download.getContent();
String contentType = download.getContentType();
ResponseBuilder rBuild = Response.ok(responseData, contentType);
return rBuild.build();
}