[fix bug 1082208] Support media files and CDN.

I find that mocking managers is a bad idea as compared to just creating the uploaded file in the database using the factory. Managers are finnicky and the way they're called changes often (like slapping a small filter or a unique or whatever) in ways that break tests easily.