[IMP] Reliably assign file extensions for pasted clipboard files using MIME mapping#1076
[IMP] Reliably assign file extensions for pasted clipboard files using MIME mapping#1076Che4ter wants to merge 1 commit into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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. Comment |
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.