template and upload