public function file($inputID, $inputName, $chooseText, $preselectedFile = null, $args = [])
    {
        $app = Application::getFacadeApplication();

        $view = View::getInstance();
        $request = $app->make(Request::class);
        $vh = $app->make('helper/validation/numbers');

        $view->requireAsset('core/file-manager');
        $fileSelectorArguments = [
            'inputName' => (string) $inputName,
            'fID' => null,
            'filters' => [],
        ];
        if ($vh->integer($request->request->get($inputName))) {
            $file = $app->make(EntityManagerInterface::class)->find(FileEntity::class, $request->request->get($inputName));
            if ($file !== null) {
                $fileSelectorArguments['fID'] = $file->getFileID();
            }
        } elseif ($vh->integer($preselectedFile)) {
            $fileSelectorArguments['fID'] = (int) $preselectedFile;
        } elseif (is_object($preselectedFile)) {
            $fileSelectorArguments['fID'] = (int) $preselectedFile->getFileID();
        }
        if ($fileSelectorArguments['fID'] === null && (string) $chooseText !== '') {
            $fileSelectorArguments['chooseText'] = (string) $chooseText;
        }

        if (isset($args['filters']) && is_array($args['filters'])) {
            $fileSelectorArguments['filters'] = $args['filters'];
        }

        $fileSelectorArgumentsJson = json_encode($fileSelectorArguments);
        $html = <<<EOL
<div class="ccm-file-selector" data-file-selector="{$inputID}"></div>
<script type="text/javascript">
$(function() {
    $('[data-file-selector="{$inputID}"]').concreteFileSelector({$fileSelectorArgumentsJson});
});
</script>
EOL;

        return $html;
    }