FIX: Update upload secure status when revising posts (PR #13110)

When uploads are created from the composer (editing or creating a post), for sites with secure uploads enabled we assume security by default and that new upload is set to secure. When the post is created, we then check whether the post uploads actually need to be secure and adjust accordingly.

We were not doing this when revising a post, so when a new upload was created when editing a post in a public topic, the secure status stayed true erroneously causing issues with image previews, among other things.


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