upload_file: fix compile warning