Optimize the upload process by checking if the file is already uploaded before
we transfer it.