makeplane / makeplane/plane

[feature]: Valid file uploads (CSV, MD) failing with "Invalid file type" due to strict browser MIME matching

Open
#9,494 1 comment 0 reactions 2 assignees View on GitHub

@vihar is already working on this.

Since Jul 29, 2026.

✨feature plane
Dominant language
TypeScript
Stars
59.6k
Forks
5.8k
Avg merge
1d 22h
Merged PRs (30d)
49

Description

Is there an existing issue for this?
  • I have searched the existing issues
Summary

Feature Request: Expand Allowed Attachment File Types & Improve MIME Type Validation

Description

Currently, the self-hosted version of Plane implements a very strict whitelist for file uploads via the ATTACHMENT_MIME_TYPES setting in plane/settings/common.py.

While this provides security, it results in a poor user experience because:

  1. Many standard file types are missing from the list.
  2. Different operating systems and browsers often send slightly different MIME type strings for the exact same file extension (e.g., .md sent as text/plain or text/x-markdown, .csv sent as application/csv).

When a user tries to upload a perfectly safe, standard file, if their browser's inferred MIME type doesn't perfectly match Plane's hardcoded list, they receive a generic {"error": "Invalid file type.", "status": False} response.

Proposed Solution

We propose two improvements to the attachment handling system:

1. Expand the ATTACHMENT_MIME_TYPES whitelist:
Include common aliases for already supported file types to prevent valid files from being rejected simply because the user's browser sent a variant MIME type.

  • Markdown: Add text/x-markdown, application/markdown
  • CSV: Add application/csv, text/comma-separated-values

2. Make allowed file types configurable (Optional but Recommended):
Instead of entirely hardcoding ATTACHMENT_MIME_TYPES in common.py, allow workspace administrators to define or extend allowed file extensions/MIME types via an environment variable (e.g., EXTRA_ALLOWED_MIME_TYPES="text/csv,application/csv"). This gives self-hosted users the flexibility to support specific workflows without needing to modify the core Python codebase.

Use Case

Users frequently attempt to attach standard developer or business files (like Markdown documentation or CSV data exports) to issues. Currently, these fail silently in the UI or show an "Invalid file type" toast, leading users to believe the platform is broken when it is simply a strict MIME matching issue.

Environment

  • Deployment: Self-Hosted (Docker)
  • Component: API backend (plane/settings/common.py)
Why should this be worked on?

This should be worked on because it creates a frustrating and confusing user experience. When users attempt to upload perfectly standard, safe files (like .csv data exports or .md documentation) to an issue, the system rejects them with a generic "Invalid file type" error.

Because the backend strictly checks a hardcoded list of MIME types, it fails to account for the reality that different operating systems and browsers (Chrome, Edge, Firefox, Safari) send different MIME strings for the exact same file extension. Expanding the allowed list or making it configurable prevents valid workflows from being blocked and reduces the impression that the platform's upload feature is broken.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.