Enabling iCalendar attachments

I thought it will be useful and convenient to share webinar appointments in iCalendar .ics format, so that everybody can import them to organizer and keep track on easily, but realized that forum doesn’t allow this.

Sorry, the file you are trying to upload is not authorized (authorized extension: jpg, jpeg, png, gif).

Is this for security reasons? Any chance to enable this kind of attachments?

2 Likes

@strixaluco
For now this feature is not available. Request you please create a github issue for the same.
Thanks for your cooperation.

@ArundhatiS, you mean to file issue in Discourse’s repo?

Edit: according to their forum, Adding File Type Attachments:

Not able to send email with ics file as an attachment

code to generate the event

from ics import Calendar, Event

def make_event_file(customer_details):
    c = Calendar()
    e = Event()
    e.name = "Event Name"
    e.begin = customer_details.get("starts_on")
    c.events.add(e)
    c.events
    # [<Event 'My cool event' begin:2014-01-01 00:00:00 end:2014-01-01 00:00:01>]
    with open('my.ics', 'w') as my_file:
        my_file.writelines(c)

    return my_file

# Error traceback
14:18:53 web.1            |   File "/Users/navdeepghai/navdeep/portal/apps/frappe/frappe/__init__.py", line 487, in sendmail
14:18:53 web.1            |     inline_images=inline_images, header=header, print_letterhead=print_letterhead)
14:18:53 web.1            |   File "/Users/navdeepghai/navdeep/portal/apps/frappe/frappe/email/queue.py", line 162, in send
14:18:53 web.1            |     print_letterhead=print_letterhead)
14:18:53 web.1            |   File "/Users/navdeepghai/navdeep/portal/apps/frappe/frappe/email/queue.py", line 183, in add
14:18:53 web.1            |     email_queue = get_email_queue(recipients, sender, subject, **kwargs)
14:18:53 web.1            |   File "/Users/navdeepghai/navdeep/portal/apps/frappe/frappe/email/queue.py", line 196, in get_email_queue
14:18:53 web.1            |     if att.get('fid'):
14:18:53 web.1            | AttributeError: '_io.TextIOWrapper' object has no attribute 'get'
14:18:53 web.1            |