public function downloadAction()
    {
        $fileManager = $this->container->get('thrace_media.filemanager');
        $filepath = $this->getRequest()->get('filepath');
        $filename = SlugFilter::filter($this->getRequest()->get('filename'));

        $content = $fileManager->getPermanentFileBlobByName($filepath);

        $response = new Response($content);
        $response->headers->set('Content-Length', mb_strlen($content));
        $response->headers->set('Content-Type', $this->getMimeType($content));
        $response->headers->set('Content-Disposition', 'attachment;filename=' . $filename);
        $response->expire();
        
        return $response;
    }