fix undefined options and user-defined uploadpath
Merge pull request #2 from mathisonian/master

fix undefined options and user-defined uploadpath