Skip to content

[IMP] Reliably assign file extensions for pasted clipboard files using MIME mapping#1076

Open
Che4ter wants to merge 1 commit into
dfir-iris:developfrom
baseVISION:contrib/mime-extension-fix
Open

[IMP] Reliably assign file extensions for pasted clipboard files using MIME mapping#1076
Che4ter wants to merge 1 commit into
dfir-iris:developfrom
baseVISION:contrib/mime-extension-fix

Conversation

@Che4ter
Copy link
Copy Markdown

@Che4ter Che4ter commented May 12, 2026

Problem:
Images pasted into Markdown notes/summaries lacked file extensions. While they worked in the markdown preview, the missing extensions caused several issues. For example when you want to download them from the datastore or when you include them in reports.

Solution:
Replaced the legacy file naming method with a new get_extension_from_mime() utility. It reads the exact MIME type (e.g., image/png, image/avif) directly from the clipboard blob and maps it to the correct extension. This ensures every pasted image gets the correct file extension.

image

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 12, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • api_*

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a8dfe4ae-4948-4c49-a280-99c09e4e16ca

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

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.

1 participant