List of usage examples for org.springframework.data.mongodb.gridfs GridFsResource getId
public Object getId()
From source file:piecework.util.ContentUtility.java
public static ContentResource toContent(GridFsResource resource) throws IOException { String resourceId = resource.getId().toString(); return new BasicContentResource.Builder().contentId(resourceId).contentType(resource.getContentType()) .filename(resource.getFilename()).location(resource.getFilename()) .inputStream(resource.getInputStream()).lastModified(resource.lastModified()) .length(Long.valueOf(resource.contentLength())).build(); }