ics.php should download as a .ics file
continuous-integration/drone/pr Build encountered an error Details
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Robert Miles 2020-07-02 23:04:12 -04:00
parent 24fe2f80c0
commit 3ca33228f5
1 changed files with 3 additions and 0 deletions

View File

@ -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");