add upload function
Merge pull request #1 from michaelwang/master

add upload function