add function upload all files in a directory
update test