Assets - 'Allow uploading directly to the field' unexpected results #10145
-
@brandonkelly Continuing on from #10139 Ok, if this is the expected behaviour then that's fine - I've found with editors for some reason, who have full access, keep using this function to upload the file and we've ended up with literally hundreds of the same file, different names, used across the site - a nightmare to manage. So - what about having a config setting where we can set this option to unchecked by default? Add a setting (https://craftcms.com/docs/3.x/config/config-settings.html#assets) i.e. allowUploadingDirectlyToField
This way - the default behaviour doesn't change, but it allows us to override the option being checked by default? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
You can disable the “Allow uploading directly to the field” setting for all existing Assets fields by doing the following:
Adding a new config setting would probably just make things more confusing. In general we are trying to move away from config settings that conflict with other settings. |
Beta Was this translation helpful? Give feedback.
You can disable the “Allow uploading directly to the field” setting for all existing Assets fields by doing the following:
Run the command:
In a text editor, use the Find & Replace feature to replace all instances of
allowUploads: true
withallowUploads: false
in yourconfig/project/
folder.Run the following commands:
Adding a new config setting would probably just make things more confusing. In general we are trying to move away from config settings that conflict with other settings.