Store response headers in the client temporarily so they can be referenced.
Add basic fetch_to_file and an online-only test for it.
Update MediaFile object to store filename as a property.
Break out the dodgy if statement into a map.