use of org.platformlayer.ops.OneTimeDownloads.Download in project platformlayer by platformlayer.
the class BlobsResource method downloadBlob.
@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();
}
Aggregations