use of org.jbei.ice.lib.net.RemoteEntries in project ice by JBEI.
the class FileResource method getRemoteAttachment.
@GET
@Path("remote/{id}/attachment/{fileId}")
public Response getRemoteAttachment(@PathParam("id") long partnerId, @PathParam("fileId") String fileId, @QueryParam("sid") String sid) {
String userId = getUserId(sessionId);
RemoteEntries entries = new RemoteEntries();
File file = entries.getPublicAttachment(userId, partnerId, fileId);
if (file == null)
return respond(Response.Status.NOT_FOUND);
return addHeaders(Response.ok(file), "remoteAttachment");
}
Aggregations