Skip to content

Conversation

@AshrithSathu
Copy link

@AshrithSathu AshrithSathu commented Jan 10, 2026

Description

  • Added text/markdown to ATTACHMENT_MIME_TYPES
  • Fixes issue where .md files were rejected with 'Invalid file type' error

Type of Change

  • [ x] Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Improvement (change that would cause existing functionality to not work as expected)
  • Code refactoring
  • Performance improvements
  • Documentation update

References


Note

Allow markdown attachments

  • Adds text/markdown to ATTACHMENT_MIME_TYPES in apps/api/plane/settings/common.py and to ACCEPTED_ATTACHMENT_MIME_TYPES in packages/editor/src/core/constants/config.ts
  • Enables uploading .md files that were previously rejected as invalid

Written by Cursor Bugbot for commit aa6e3a4. This will update automatically on new commits. Configure here.

Summary by CodeRabbit

  • New Features
    • Added support for markdown file attachments (recognizes text/markdown), expanding accepted upload formats.

✏️ Tip: You can customize this high-level summary in your review settings.

- Add text/markdown to ATTACHMENT_MIME_TYPES
- Fixes issue where .md files were rejected with 'Invalid file type' error
@CLAassistant
Copy link

CLAassistant commented Jan 10, 2026

CLA assistant check
All committers have signed the CLA.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 10, 2026

📝 Walkthrough

Walkthrough

Added the MIME type "text/markdown" to attachment MIME type lists in both the API settings and the editor config, allowing .md files to be accepted where they were previously rejected.

Changes

Cohort / File(s) Summary
API settings
apps/api/plane/settings/common.py
Added "text/markdown" to ATTACHMENT_MIME_TYPES.
Editor config
packages/editor/src/core/constants/config.ts
Added "text/markdown" to ACCEPTED_ATTACHMENT_MIME_TYPES.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A tiny MIME hops through the gate,

Markdown welcomed — no longer late.
One small string, a simple decree,
Now notes and plans attach happily.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title '[GIT-45] fix: allow markdown file attachments' directly describes the main change—adding support for markdown file attachments.
Description check ✅ Passed The PR description includes required sections (Description, Type of Change selection, References) and provides clear context about the changes made to support markdown attachments.
Linked Issues check ✅ Passed The PR addresses issue #8519 by adding 'text/markdown' MIME type support to both backend and frontend, enabling markdown file uploads that were previously rejected.
Out of Scope Changes check ✅ Passed All changes are directly scoped to enabling markdown file attachments: MIME type additions in backend and frontend configuration files with no extraneous modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c16e0e6 and aa6e3a4.

📒 Files selected for processing (1)
  • packages/editor/src/core/constants/config.ts
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx,mts,cts}

📄 CodeRabbit inference engine (.github/instructions/typescript.instructions.md)

**/*.{ts,tsx,mts,cts}: Use const type parameters for more precise literal inference in TypeScript 5.0+
Use the satisfies operator to validate types without widening them
Leverage inferred type predicates to reduce the need for explicit is return types in filter/check functions
Use NoInfer<T> utility to block inference for specific type arguments when they should be determined by other arguments
Utilize narrowing in switch(true) blocks for control flow analysis (TypeScript 5.3+)
Rely on narrowing from direct boolean comparisons for type guards
Trust preserved narrowing in closures when variables aren't modified after the check (TypeScript 5.4+)
Use constant indices to narrow object/array properties (TypeScript 5.5+)
Use standard ECMAScript decorators (Stage 3) instead of legacy experimentalDecorators
Use using declarations for explicit resource management with Disposable pattern instead of manual cleanup (TypeScript 5.2+)
Use with { type: "json" } for import attributes; avoid deprecated assert syntax (TypeScript 5.3/5.8+)
Use import type explicitly when importing types to ensure they are erased during compilation, respecting verbatimModuleSyntax flag
Use .ts, .mts, .cts extensions in import type statements (TypeScript 5.2+)
Use import type { Type } from "mod" with { "resolution-mode": "import" } for specific module resolution contexts (TypeScript 5.3+)
Use new iterator methods (map, filter, etc.) if targeting modern environments (TypeScript 5.6+)
Utilize new Set methods like union, intersection, etc., when available (TypeScript 5.5+)
Use Object.groupBy / Map.groupBy standard methods for grouping instead of external libraries (TypeScript 5.4+)
Use Promise.withResolvers() for creating promises with exposed resolve/reject functions (TypeScript 5.7+)
Use copying array methods (toSorted, toSpliced, with) for immutable array operations (TypeScript 5.2+)
Avoid accessing instance fields via super in classes (TypeScript 5....

Files:

  • packages/editor/src/core/constants/config.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Enable TypeScript strict mode and ensure all files are fully typed

Files:

  • packages/editor/src/core/constants/config.ts
**/*.{js,jsx,ts,tsx,json,css}

📄 CodeRabbit inference engine (AGENTS.md)

Use Prettier with Tailwind plugin for code formatting, run pnpm fix:format

Files:

  • packages/editor/src/core/constants/config.ts
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{js,jsx,ts,tsx}: Use ESLint with shared config across packages, adhering to max warnings limits per package
Use camelCase for variable and function names, PascalCase for components and types
Use try-catch with proper error types and log errors appropriately

Files:

  • packages/editor/src/core/constants/config.ts
🧠 Learnings (1)
📚 Learning: 2025-11-25T10:18:05.172Z
Learnt from: CR
Repo: makeplane/plane PR: 0
File: .github/instructions/typescript.instructions.md:0-0
Timestamp: 2025-11-25T10:18:05.172Z
Learning: Applies to **/*.{ts,tsx,mts,cts} : Use `.ts`, `.mts`, `.cts` extensions in `import type` statements (TypeScript 5.2+)

Applied to files:

  • packages/editor/src/core/constants/config.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Cursor Bugbot
🔇 Additional comments (1)
packages/editor/src/core/constants/config.ts (1)

13-31: Change is correct and sufficient; no further action needed.

Adding "text/markdown" successfully enables .md file uploads in the editor allowlist. The change is complete as-is. The JavaScript File.type property returns only the MIME type without parameters (e.g., "text/markdown", never "text/markdown; charset=utf-8"), so exact string matching via .includes(file.type) works correctly. The backend validates file type metadata as the final enforcement layer.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@makeplane
Copy link

makeplane bot commented Jan 10, 2026

Linked to Plane Work Item(s)

This comment was auto-generated by Plane

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is being reviewed by Cursor Bugbot

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@AshrithSathu
Copy link
Author

@vihar @pushya22

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug]: cannot attach markdown file

2 participants