# How to configure which folders allow uploads
The configuration from file custom/modules/folder/actions/upload.xml
overwrites the default upload configuration.
Internally a condition to filter the record by id(s) is generated.
Don't set the group for a AND
condition which always should be assigned
like the mount.read_only
condition.
If you have conditions with OR
then set the group for specific
AND
conditions to for example upload
and create a sub group like upload.or
with operator OR
in the first condition. Look at the example configuration to clarify this.
# Example configuration with OR
operator
<?xml version="1.0" encoding="UTF-8"?>
<action>
<max_beans>1</max_beans>
<conditions>
<condition>
<value1 type="field">
<value>mount.read_only</value>
</value1>
<operator>equal</operator>
<value2>
<value>false</value>
</value2>
</condition>
<condition>
<group>upload</group>
<value1 type="field">
<value>isupload</value>
</value1>
<operator>equal</operator>
<value2 type="value">
<value>1</value>
</value2>
</condition>
<condition>
<group>upload</group>
<value1 type="feature">
<value>folder.allow_upload</value>
</value1>
<operator>equal</operator>
<value2>
<value>true</value>
</value2>
</condition>
<condition operator="OR">
<group>upload.or</group>
<value1 type="field">
<value>owner_role</value>
</value1>
<operator>equal</operator>
<value2>
<value>1</value>
</value2>
</condition>
<condition operator="AND">
<group>upload.or</group>
<value1 type="field">
<value>type</value>
</value1>
<operator>equal</operator>
<value2>
<value>default</value>
</value2>
</condition>
</conditions>
<order>-12</order>
<label>L-FOLDER-ACTION-UPLOAD</label>
<info>L-FOLDER-ACTION-UPLOAD-INFO</info>
<icon>FOLDER-ACTION-UPLOAD</icon>
</action>