Initial working code to upload files and folders