public function getAttachmentAction(Request $request, $number)
{
$em = $this->container->get('em');
$attachment = $em->getRepository('Newscoop\\Entity\\Attachment')->getAttachment($number)->getOneOrNullResult();
if (!$attachment) {
throw new EntityNotFoundException('Result was not found.');
}
return $attachment;
}