Fixed minor bug in rest upload api