public function download($attachmentId = null)
    {
        $attachment = $this->Attachments->get($attachmentId);

        $this->_checkAuthorization($attachment);

        $this->response->file($attachment->getAbsolutePath(), [
            'download' => true,
            'name' => $attachment->filename
        ]);
        return $this->response;
    }