fix a bug of uploading file