We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 707f160 commit 280ac5bCopy full SHA for 280ac5b
app/api/custom/calendars.py
@@ -16,12 +16,12 @@
16
def export_event(event_id):
17
event = Event.query.get_or_404(event_id)
18
include_sessions = 'include_sessions' in request.args
19
- download = 'download' in request.args
20
21
response = to_ical(event, include_sessions=include_sessions)
22
23
- if download:
24
- response = make_response(response)
+ response = make_response(response)
+ response.headers['Content-Type'] = 'text/calendar'
+ if 'download' in request.args:
25
response.headers[
26
'Content-Disposition'
27
] = f'attachment; filename={event.identifier}-{event.name}-Calendar.ics;'
0 commit comments