FIX: errors loading secure uploads when secure media is disabled (PR #13047)

After restoring a database from a site that had secure media configured and disabling the secure_media setting, any page with an upload will raise errors. This change will allow the uploads to be loaded from the local files. I’m not sure if this is the correct fix, so someone who knows more about secure media should review.

GitHub

This pull request has been mentioned on Discourse Meta. There might be relevant details there:

I think this change looks safe to me @martin-brennan shall we merge it?