Providing content type for attachment downloads

Fixes #4682.