Update uploading logic