jperdior
I'm new here

FS_REFERENCE allowed extensions

Jump to solution

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

1 Solution

Accepted Solutions

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

View solution in original post

0 Kudos
3 Replies
MichaelaReydt
Community Manager

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

0 Kudos

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

0 Kudos
jperdior
I'm new here

Thank you for help!

0 Kudos