From 3ca33228f5e10f23b2cc6897b4463ae10e03b092 Mon Sep 17 00:00:00 2001 From: khuxkm fbexl Date: Thu, 2 Jul 2020 23:04:12 -0400 Subject: [PATCH] ics.php should download as a .ics file --- schedule/ics.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/schedule/ics.php b/schedule/ics.php index db57d5f..fed3d0d 100644 --- a/schedule/ics.php +++ b/schedule/ics.php @@ -10,7 +10,10 @@ function ics_formatdate($date) { // ICS generation. Here be dragons. // I created the file using a Python script and reverse-engineered it to figure this out. +// text/calendar MIME type for ICS files header("Content-Type: text/calendar"); +// It should download as a .ics file +header('Content-Disposition: attachment; filename="tilderadio.ics"'); // the iCalendar Validator throws a hissy fit if lines aren't CRLF terminated define("ICS_EOL","\r\n"); -- 2.34.1