public function downloadAction() {
        $ini = Zend_Registry::get('config');
        $downloadType = $this->getRequest()->getParam('downloadType') ?: Garp_File::TYPE_DOCUMENTS;
        $uploadOrStatic = $this->getRequest()->getParam('uploadOrStatic') ?: 'upload';
        $file = $this->getRequest()->getParam('file');

        if (!$file) {
            throw new Zend_Controller_Action_Exception('Geen bestandsnaam opgegeven.', 404);
        }

        try {
            $fileHandler = new Garp_File($downloadType, $uploadOrStatic);
            $url = $fileHandler->getUrl($file);
            $this->_downloadFile($url);
        } catch (Garp_File_Exception_InvalidType $e) {
            // Just throw a 404, since the error is basically just a wrong URL.
            throw new Zend_Controller_Action_Exception($e->getMessage(), 404);
        }
    }