Fixed upload function
Merge pull request #11 from nrem/master

Fixed upload function