upload hmwr javascript