fixed bug of upload the same image twice