Reputation: 567
So I have my ics file in Google Cloud Storage and I would like to serve it through my API so I don't have to make the ics file public. However, I am not sure what is the right way to do that so that the user can put the link to my api call in their Google Calendar as a webcal link to subscribe to the calendar.
Is this possible or do I have to provide a direct link to the ICS file for the user to be able to subscribe to the calendar? If it is possible, how would I go about serving the file in NodeJS?
Example:
https://storage.googleapis.com/example/calendar.ics
would be able to be served through https://api.com/example/userID/calendars
webcal://api.com/example/userID/calendars would then be used in the Google Calendars to subscribe to the calendar
Upvotes: 0
Views: 2279
Reputation: 567
So I had two options available to me:
So for method 2, I basically just had to do gcs.bucket('bucket_name').file('file path to ics file in bucket').download((error, content) => res.send(content))
Upvotes: 1