Hello,
I have created my own component and use the form field in the backend:
<field
name="file"
type="media"
label="COM_TOOLBOXHEKA_FIELD_FILE_LABEL"
description="COM_TOOLBOXHEKA_FIELD_FILE_DESC"
preview="false"
class="span12"
hint="text"
accept="/image/downloads/"
showon="type:1"
/>
In the JCE configuration I have activated both parameters in Profile > Plugin Settings > Media Field Options, so that when using the form field the JCE Media Browser is started and I can select or upload a file.
But I can only select or upload files with the extension jpg, jpeg, png, apng, gif, webp, avif, although the extension pdf is entered in the JCE configuration > plugin settings > picture manager. In the global Joomla media configuration, PDF is also entered as a permitted file extension, image ending and file type.
I know there is a hack where you can enter additional file types in com_media. But since this cannot be updated.
I also read somewhere that the property should be added to the form field.
<field
name="file"
type="media"
label="COM_TOOLBOXHEKA_FIELD_FILE_LABEL"
description="COM_TOOLBOXHEKA_FIELD_FILE_DESC"
preview="false"
class="span12"
hint="text"
accept="/image/downloads/"
showon="type:1"
filter="pdf"
/>
But even then I cannot select or upload a PDF.
Does anyone know a solution to this?