Use file content_type when file is ActionDispatch::Http::UploadedFile