Occasional Collector

How to identifiy the file extension uploading via FS_REFERENCE component by using Rules tab?

Hello Team,


I would like to know the type of file which is uploaded in FS_REFERENCE name="st_video" component?

I would like to do some kind of restrict to add only .mp4 files.

If not other file types(.swf,.jpg, including images or videos display error message in the screen. Kind of a validation.

Is it possible to achieve this via rules tab in form level, while saving the form or some thing like...??

Apart from REGEX any possibility there?

REGEX: ^(http(s)?:\/\/|www\.).*(\.mp4)$





                <PROPERTY name="EMPTY" source="st_video"/>

                <MATCHES regex="^([a-zA-Z0-9\s_\\.\-\(\):])+(.mp4)$">

                    <PROPERTY name="VALUE" source="st_video"/>





            <VALIDATION scope="SAVE">

                <PROPERTY name="VALID" source="st_video"/>

                <MESSAGE lang="*" text="Please enter a valid video file.Accepts only .mp4 extensions."/>

                <MESSAGE lang="DE" text="Bitte geben Sie eine gültige Videodatei ein. Akzeptiert nur MP4-Erweiterungen."/>




It accepts all kind of extensions not only .mp4 files.No validation message is thrown while saving the page.How to achieve this?

I hope achieving this only via Site Architect is not possible.Like to do in rules tab.

FS_REFERENCE returns object via TargetRefrence. Only object will be returned.

Normal Textbox returns String. so its possible for checking like mail validation and others.


FS_REFERENCE &gt; Einschränkung auf Dateiendungen / Restriction to file extensions

Again for FS_REFERENCE validation writing a hook via module(custom form validation programmed in Java)?

Thank you.



0 Kudos
0 Replies