fix uploadlog route and add a basic test to it

issue 1932