Search the FirstSpirit Knowledge Base
Good morning,
I was wondering if I can control the concrete extensions for a field, not only if it's an image or a file. In concrete I want to only allow the extensions ogg, mp4 and webm.
Thanks and Kind Regards,
Julio
Hi Julio,
Michaela is right. Picking files by specific extention is not possible.
However if you put those files you want in a special place inside the media store. Then you can specify that the FS_REFERENCE can only choose from this special place:
<FS_REFERENCE name="st_file" upload="no">
...
<PROJECTS>
<LOCAL name=".">
<SOURCES>
<FOLDER name="videos" store="mediastore"/>
</SOURCES>
</LOCAL>
</PROJECTS>
...
</FS_REFERENCE >
videos is the reference name of that special folder inside the mediastore.
An other solution without the restriction above would involve custom form validation programmed in Java if this would be an option?
Best regards
Marian
Hello Julio,
unfortunately it is not possible to control that just files or media with a specific extensions can be selected via the FS_REFERENCE-component.
Maybe a possible idea could be to list all allowed files and images in a report and to select them from there.
Best regards
Michaela
Hi Julio,
Michaela is right. Picking files by specific extention is not possible.
However if you put those files you want in a special place inside the media store. Then you can specify that the FS_REFERENCE can only choose from this special place:
<FS_REFERENCE name="st_file" upload="no">
...
<PROJECTS>
<LOCAL name=".">
<SOURCES>
<FOLDER name="videos" store="mediastore"/>
</SOURCES>
</LOCAL>
</PROJECTS>
...
</FS_REFERENCE >
videos is the reference name of that special folder inside the mediastore.
An other solution without the restriction above would involve custom form validation programmed in Java if this would be an option?
Best regards
Marian
Thank you for help!