nwcell / ics.js

A browser firendly VCS file generator written entirely in javascript!!!!!!
MIT License
614 stars 258 forks source link

Mobile version download document.txt instead ics #72

Open davidtacer opened 4 years ago

davidtacer commented 4 years ago

On mobile I got document.txt file instead of .ics. On desktop works perfect. It's possible to add Invitees/attendee?

loicparent commented 3 years ago

Hello,

I encounter a similar issue: On desktop works perfect too. On mobile (IOS 14), the ICS file is downloaded but not executed. I can find it in the files app and I can't open it in the calendar (IOS). I can find it in the Downloads app and I can open it in the calendar (Android)

Is it possible to force open the file in the calendar instead of downloading it?

Thanks :)

alike03 commented 3 years ago

To fix this you can either pull this commit or change it yourself since this project is pretty much abandoned.

Change this: blob = new Blob([calendar]); to this: blob = new Blob([calendar], {type: "text/calendar;charset=utf-8"});

loicparent commented 3 years ago

Thank you @alike03 !

EdyPopa92 commented 3 years ago

How can I save the .ics file on my server?

alike03 commented 3 years ago

How can I save the .ics file on my server?

I strongly advise against it. It's a security risk. There are also php ics generators you should rather use them. This way the user can't manipulate the file.