improve upload to support recursive upload a local dir