private function generateLink()
    {
        $extras = ['fieldType' => $this->fieldType];

        if ($this->files) {
            $extras['files'] = (bool) $this->files;
        }

        if ($this->filesOnly) {
            $extras['filesOnly'] = (bool) $this->filesOnly;
        }

        if ($this->path) {
            $extras['path'] = (string) $this->path;
        }

        if ($this->extensions) {
            $extras['extensions'] = (string) $this->extensions;
        }

        return System::getContainer()->get('contao.picker.builder')->getUrl('file', $extras);
    }