使用“未知文件类型”的iPhone Chrome上的ICS文件下载失败 [英] ICS file Download fails on iPhone Chrome with "Unknown File Type"
问题描述
在我的Win7桌面上使用Chrome浏览器,ics文件可以正常下载,并且Outlook喜欢它。
在我的iPhone上使用Safari,ics文件按预期打开日历应用程序,并允许我添加日历。
在我的iPhone上使用Chrome浏览器时,我收到下载失败,Chrome无法下载此文件,错误102():未知文件类型。
我发送这些标题:
header(Content-Type:text / Calendar; charset = utf-8 );
header(Content-Disposition:inline; filename = {$ slug} .ics);
header(HTTP / 1.0 200 OK,true,200);
和我的ics文件输出是:
BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID: - // example.com//NONSGML blah blah // EN
方法:发布
BEGIN:VEVENT
UID:20130412T062148-527420343@example.com
DTSTAMP:20130412T062148
DTSTART:20130524T134500Z
DTEND:20130524T153000Z
LOCATION :
摘要:这是摘要
描述:这是描述
STATUS:CONFIRMED
TRANS:OPAQUE
END:VEVENT
END:VCALENDAR
有关iPhone Chrome不喜欢什么的想法?
我看到的大多数例子都是小写的
http://www.w3.org/Protocols/rfc1341/4_Content-Type.html
尝试制作
内容类型:文本/日历
不是
内容类型:文本/日历
I've got a php script that's auto-generating an ics file for a mobile web app.
Using Chrome on my Win7 desktop, the ics file downloads fine, and Outlook likes it.
Using Safari on my iPhone, the ics file opens the calendar app as expected, and allows me to add to calendar.
Using Chrome on my iPhone, I get "Download Failed. Chrome cannot download this file. Error 102 (): Unkown File Type."
I'm sending these headers:
header("Content-Type: text/Calendar; charset=utf-8");
header("Content-Disposition: inline; filename={$slug}.ics");
header("HTTP/1.0 200 OK", true, 200);
and my ics file output is:
BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:-//example.com//NONSGML blah blah//EN
METHOD:PUBLISH
BEGIN:VEVENT
UID:20130412T062148-527420343@example.com
DTSTAMP:20130412T062148
DTSTART:20130524T134500Z
DTEND:20130524T153000Z
LOCATION:
SUMMARY:This is the summary
DESCRIPTION:This is the description
STATUS:CONFIRMED
TRANS:OPAQUE
END:VEVENT
END:VCALENDAR
Any ideas about what iPhone Chrome isn't liking?
most examples I see are in lowercase http://www.w3.org/Protocols/rfc1341/4_Content-Type.html
try making that
Content-Type: text/calendar
not
Content-Type: text/Calendar
这篇关于使用“未知文件类型”的iPhone Chrome上的ICS文件下载失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!