Fix download file APIs.