public function uploadAction()
    {
        if (!$filename = $this->get('vince_type.manager.redactor')->uploadFile()) {
            return new JsonResponse(array(
                    'error' => $this->get('translator')->trans('redactor.messages.fileUploadError', array(), 'Vince'),
                )
            );
        }

        return new Response(json_encode(array(
            'filelink' => $filename,
            'filename' => pathinfo($filename, PATHINFO_FILENAME),
            ), JSON_UNESCAPED_SLASHES), 200, array(
                'Content-Type' => 'application/json',
            )
        );
    }