fix tests & add upload file support