Use file content_type when file is ActionDispatch::Http::UploadedFile
Keep ActionDispatch logic in one place