updated uploading functionality (does not work on ur device in this version)