Skip to content

Comments

fix: preserve original HEIC/HEIF files and treat them as file type#286

Merged
OnestarLee merged 1 commit intomainfrom
fix/heic-file-handling
Feb 5, 2026
Merged

fix: preserve original HEIC/HEIF files and treat them as file type#286
OnestarLee merged 1 commit intomainfrom
fix/heic-file-handling

Conversation

@bang9
Copy link
Collaborator

@bang9 bang9 commented Feb 3, 2026

External Contributions

This project is not yet set up to accept pull requests from external contributors.

If you have a pull request that you believe should be accepted, please contact
the Developer Relations team developer-advocates@sendbird.com with details
and we'll evaluate if we can setup a CLA to allow for the contribution.

For Internal Contributors

[TICKET_ID]

Description Of Changes

HEIC/HEIF files are not universally supported across platforms, so UIKit has been treating them as regular files for product compatibility.

Previously, there were cases where HEIC/HEIF files did not have their MIME type properly set. In these cases, getFileType function would fall back to checking the file extension and correctly classify them as file. (Unintentionally working correctly due to a bug)

After recent changes that fixed the MIME type detection, HEIC/HEIF files now have proper MIME types like image/heic. This caused getFileType to classify them as image based on the MIME type prefix. (Fixing one bug exposed another issue)

Solution

Add explicit handling for HEIC/HEIF in getFileType to treat them as file type instead of image.

Side Effects

This change has no negative side effects. The following behaviors are all intentional:

  1. Download: HEIC/HEIF files will be saved to the downloads directory instead of images directory
  2. File Viewer: HEIC/HEIF files will open via system handler instead of the image viewer
  3. Message UI: HEIC/HEIF messages will display as File Message instead of Image Message
  4. Channel Preview: Last message will show as "File" instead of "Photo"

Types Of Changes

What types of changes does your code introduce to this project?
Put an x in the boxes that apply_

  • Bugfix
  • New feature
  • Documentation (correction or otherwise)
  • Cosmetics (whitespace, appearance (ex) Prettier)
  • Build configuration
  • Improvement (refactor code)
  • Test

HEIC/HEIF are not universally supported for inline display, treat them as file type for consistent cross-platform behavior.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@bang9 bang9 force-pushed the fix/heic-file-handling branch from 49acc46 to 3b754a5 Compare February 3, 2026 09:08
@bang9 bang9 requested a review from OnestarLee February 3, 2026 09:09
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 10.88%. Comparing base (67bec6d) to head (3b754a5).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #286      +/-   ##
==========================================
+ Coverage   10.85%   10.88%   +0.02%     
==========================================
  Files         360      360              
  Lines        9050     9053       +3     
  Branches     2437     2575     +138     
==========================================
+ Hits          982      985       +3     
+ Misses       8067     7992      -75     
- Partials        1       76      +75     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Collaborator

@OnestarLee OnestarLee left a comment

Choose a reason for hiding this comment

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

lgtm! 바로 머지할꼐요

@OnestarLee OnestarLee enabled auto-merge February 5, 2026 01:05
@OnestarLee OnestarLee disabled auto-merge February 5, 2026 01:50
@OnestarLee OnestarLee enabled auto-merge February 5, 2026 01:50
@OnestarLee OnestarLee disabled auto-merge February 5, 2026 02:13
@OnestarLee OnestarLee merged commit dabdd74 into main Feb 5, 2026
7 checks passed
@OnestarLee OnestarLee deleted the fix/heic-file-handling branch February 5, 2026 02:13
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.

3 participants