Fixed bug in generating upload/update url, and comment out unused code