public function deleteAction($parameter) {
        try {
            if(!$this->request->isPost()) {
                return $this->jsonResult(400, 'Please access via POST method.', 'error_access_post');
            }

            if(!$this->getFile()) {
                return $this->jsonResult(400, 'No file was uploaded.', 'error_no_file');
            }

            $this->initFromSession();

            $this->file = NULL;

            $this->filename = NULL;

            $this->filesize = NULL;

            $this->saveToSession();

            if(!$this->deleteFile()) {
                return $this->jsonResult(400, 'Could not delete file.', 'error_delete_failed');
            }

            return $this->jsonResult();
        }
        catch(Exception $e) {
            return $this->jsonResult(500, $e->getMessage());
        }
    }