919293949596979899
} private GridFsFile findFile(String fileName) { List<GridFsFile> files = fileCollection.query(new Query().field("filename").is(fileName)); if (files.isEmpty()) { throw new NotFoundException("File not found: " + fileName); } return files.get(0); }