fix the upload bug of clicking twice