fix a bug in upload file