bz19133. Made modifications to match the latest uploadtemplate master.