From a28e494305c72e8ea45a6261e5eec367923d5660 Mon Sep 17 00:00:00 2001 From: Kilian Domaratius Date: Thu, 10 Sep 2020 10:35:11 +0200 Subject: [PATCH] Fix: Missing MIME type for firefox Added a blob type declaration for Firefox/Chrome browsers. Without MIME type, Firefox interpret it as text document instead of calendar file. --- ics.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ics.js b/ics.js index 68180da..f67361f 100644 --- a/ics.js +++ b/ics.js @@ -214,7 +214,7 @@ var ics = function(uidDomain, prodId) { var blob; if (navigator.userAgent.indexOf('MSIE 10') === -1) { // chrome or firefox - blob = new Blob([calendar]); + blob = new Blob([calendar], {type: "text/x-vCalendar;charset=utf-8"}); } else { // ie var bb = new BlobBuilder(); bb.append(calendar);