silverstripe/sapphire — pull request #1086 by chillu (2013-01-09 15:32:57+00:00)
Title: UploadField->setConfig('canUpload', false)

Useful if you just want to allow selection from existing files for a relation.

In order to set this globally (effectively disabling all upload capabilities),
I've added a global YML UploadField config. Introduces a bit of duplication
between the config keys in UploadField->ufConfig and uploadfield.yml.
But the YAML format (or Config parser) doesn't allow for empty keys (empty defaults),
so we'll need to take in the PHP definitions as a baseline.
Alternatively, we could check for existence of config keys whenever the config is used,
but that strikes me as an inferior solution, right?