Fixed the js error arising when no upload options have been specified