Content c = contentMng.findById(cid);
if (c != null) {
List<ContentAttachment> list = c.getAttachments();
if (list.size() > i) {
contentCountMng.downloadCount(c.getId());
ContentAttachment ca = list.get(i);
response.sendRedirect(ca.getPath());
return;
} else {
log.info("download index is out of range: {}", i);
}
} else {