<?php

$file = 'templates/machine_upload_template.csv';

if (!file_exists($file)) {
    die('Template file not found.');
}

header('Content-Type: text/csv');
header('Content-Disposition: attachment; filename="machine_upload_template.csv"');
header('Content-Length: ' . filesize($file));

readfile($file);
exit;