Support resource upload, close #4