Fixed the path to support relative path for template uploads