@QueryParam( "mimeType" ) String mimeType,
@QueryParam( "contentDisposition" ) String contentDisposition ) throws RepositoryException {
Property binaryProperty = binaryHandler.getBinaryProperty(request, repositoryName, workspaceName, path);
if (binaryProperty.getType() != PropertyType.BINARY) {
return Response.status(Response.Status.NOT_FOUND)
.entity(new RestException("The property " + binaryProperty.getPath() + " is not a binary")).build();
}
Binary binary = binaryProperty.getBinary();
if (StringUtil.isBlank(mimeType)) {
mimeType = binaryHandler.getDefaultMimeType(binaryProperty);
}