Prevent duplicated photos when uploading