Fixes #16851: Downloading, viewing, and checking existence of attachment...

...s should get attachment location from db.

I have this on 1.2.x.  Not sure this is critical for 1.2.x, but I thought I would get feedback on the change and whether to go to master only or master + 1.2.x before I create the master pull request.