I need to create a web app that can create a calendar for each individual user as a .ics file. This .ics file needs to share via a link so that they can add it to a calendar service like google calendar. I can create the .ics file and save it locally on the machine or server. But I don't know how to share that file using a link?
1 Answers
Melange, If your ics file is valid as per the RF5545 specification and it has the mime type text/calendar and it is publicly accessible, then it is shareable just like any file or url is shareable. Either as a url or available as a href behind a link with text or an icon.
The suffix .ics and the mimetype will tell other applications and browsers what it is and then the receiving system will react in whatever way the user has specified they should for that file type, usually to prompt with the calendar app. For me on my desktop, I open .ics files in my text editor ;)
The METHOD instead the file also influences the calendnar action. Usually we use PUBLISH for calendars we want people to subscribe to and REQUEST if it is a meeting request sent by email.
More info here:
One click url for importing webcal to google/outlook calendar
how to use webcal protocol Please ignore the 'webcal' - that is apple talk, the ics spec specifies http protocol

- 3,830
- 1
- 15
- 15
-
Thank you for your information. Can you recommend to me some resources about sharing a shareable item? – Melanga Dissanayake Nov 08 '21 at 04:29
-
1Melanga - perhaps you are overthinking it? Literally one can share an ics url just like any other url, webpage or image or tweet or post etc in anyway you want, by email, by text message, as a link on a website etc – anmari Nov 09 '21 at 05:26
-
For example, here's me sharing a publicly available google calendar 'phases of the moon' https://calendar.google.com/calendar/embed?src=ht3jlfaac5lfd6263ulfh4tql8%40group.calendar.google.com&ctz=Australia%2FSydney – anmari Nov 09 '21 at 05:29
-
Yes, now I can understand what you are saying. I indeed have been overthinking. Thank you so much. – Melanga Dissanayake Nov 10 '21 at 05:46