Skip to content

application/octet-stream .ics attachment not detected as event #13688

Closed

Description

@mrtumnus

Steps to reproduce

  1. Send email containing .ics attachment with MIME type set to application/octet-stream
  2. Open email in Nextcloud calendar
  3. Attempt to add attached event to Calendar

Expected behavior

Attachment is identified as a calendar event:

Image

Actual behavior

Attachment listed without "Add to Calendar" option:

Image

Mail app version

5.12.0

Nextcloud version

34.0.4

Mailserver or service

Gmail

Operating system

Debian LXC

PHP engine version

PHP 8.3

Nextcloud memory caching

No response

Web server

Apache (supported)

Database

MariaDB

Additional info

I realize that application/octet-stream is a non-standard MIME-type for a calendar attachment, but this is something users have no control over. In this case, the email was sent from a local blood bank.

Perhaps it would be more accessible to either:

  • Allow for a list of custom mime types permitted for calendar attachments (still relatively brittle)
  • Add a MIME bypass for files with extension .ics

Activity

  1. added theissue type on Sep 15, 2026
  2. added
    good first issue
    and removed on Sep 26, 2026
  3. kesselb commented on Sep 26, 2026

    @kesselb
    Contributor

    Thanks a lot 👍

    That sounds like a good idea.

    return in_array($attachment['mime'], ['text/calendar', 'application/ics'], true);

    The attachment array should have a field "fileName"

    * fileName: string|null,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    1. to developbuggood first issue

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions