[Regression][iOS] Fix MediaPicker PickPhotosAsync getting file name in contentType property#33390
Merged
PureWeen merged 2 commits intodotnet:inflight/currentfrom Jan 14, 2026
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug in the iOS MediaPicker where the FileName was incorrectly being stored in the ContentType property when creating rotated image results. The issue occurred because the FileResult constructor's second parameter expects a MIME type (contentType), but the filename was being passed instead.
Key changes:
- Modified FileResult initialization to use object initializer syntax for setting the FileName property instead of passing it as a constructor parameter
jfversluis
approved these changes
Jan 8, 2026
Member
jfversluis
left a comment
There was a problem hiding this comment.
✅ LGTM - Approved
This is a clean regression fix for the MediaPicker issue where FileName and ContentType were swapped.
Changes:
- Correctly initializes FileResult with proper property assignments
- Preserves both FileName and ContentType as suggested in review
- All CI checks passing (23/23)
Impact:
- Fixes regression introduced in 10.0-preview7
- Restores correct behavior for iOS MediaPicker with RotateImage=true
Great catch and clean fix! 🚀
github-actions bot
pushed a commit
that referenced
this pull request
Jan 16, 2026
…n contentType property (#33390) <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Details The FileResult constructor was being called with (filePath, fileName) but the second parameter expects a MIME type, not a filename. This caused the filename to be stored as ContentType. ### Description of Change <!-- Enter description of the fix in this section --> Fixed FileResult initialization to properly preserve the filename and ContentType. ### Regarding Test Case Picking an image is not possible in a test. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #33348 <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> **Tested the behavior in the following platforms.** - [ ] Android - [ ] Windows - [x] iOS - [x] Mac | Before | After | |---------|--------| | **iOS**<br> <video src="https://github.com/user-attachments/assets/47360519-a071-47eb-9a79-66069f8711a8" width="300" height="600"> | **iOS**<br> <video src="https://github.com/user-attachments/assets/47a43e9d-c90f-4c79-ac81-779e50198cff" width="300" height="600"> |
github-actions bot
pushed a commit
that referenced
this pull request
Jan 20, 2026
…n contentType property (#33390) <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Details The FileResult constructor was being called with (filePath, fileName) but the second parameter expects a MIME type, not a filename. This caused the filename to be stored as ContentType. ### Description of Change <!-- Enter description of the fix in this section --> Fixed FileResult initialization to properly preserve the filename and ContentType. ### Regarding Test Case Picking an image is not possible in a test. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #33348 <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> **Tested the behavior in the following platforms.** - [ ] Android - [ ] Windows - [x] iOS - [x] Mac | Before | After | |---------|--------| | **iOS**<br> <video src="https://github.com/user-attachments/assets/47360519-a071-47eb-9a79-66069f8711a8" width="300" height="600"> | **iOS**<br> <video src="https://github.com/user-attachments/assets/47a43e9d-c90f-4c79-ac81-779e50198cff" width="300" height="600"> |
github-actions bot
pushed a commit
that referenced
this pull request
Jan 21, 2026
…n contentType property (#33390) <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Details The FileResult constructor was being called with (filePath, fileName) but the second parameter expects a MIME type, not a filename. This caused the filename to be stored as ContentType. ### Description of Change <!-- Enter description of the fix in this section --> Fixed FileResult initialization to properly preserve the filename and ContentType. ### Regarding Test Case Picking an image is not possible in a test. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #33348 <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> **Tested the behavior in the following platforms.** - [ ] Android - [ ] Windows - [x] iOS - [x] Mac | Before | After | |---------|--------| | **iOS**<br> <video src="https://github.com/user-attachments/assets/47360519-a071-47eb-9a79-66069f8711a8" width="300" height="600"> | **iOS**<br> <video src="https://github.com/user-attachments/assets/47a43e9d-c90f-4c79-ac81-779e50198cff" width="300" height="600"> |
github-actions bot
pushed a commit
that referenced
this pull request
Jan 23, 2026
…n contentType property (#33390) <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Details The FileResult constructor was being called with (filePath, fileName) but the second parameter expects a MIME type, not a filename. This caused the filename to be stored as ContentType. ### Description of Change <!-- Enter description of the fix in this section --> Fixed FileResult initialization to properly preserve the filename and ContentType. ### Regarding Test Case Picking an image is not possible in a test. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #33348 <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> **Tested the behavior in the following platforms.** - [ ] Android - [ ] Windows - [x] iOS - [x] Mac | Before | After | |---------|--------| | **iOS**<br> <video src="https://github.com/user-attachments/assets/47360519-a071-47eb-9a79-66069f8711a8" width="300" height="600"> | **iOS**<br> <video src="https://github.com/user-attachments/assets/47a43e9d-c90f-4c79-ac81-779e50198cff" width="300" height="600"> |
PureWeen
pushed a commit
that referenced
this pull request
Jan 23, 2026
…n contentType property (#33390) <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Details The FileResult constructor was being called with (filePath, fileName) but the second parameter expects a MIME type, not a filename. This caused the filename to be stored as ContentType. ### Description of Change <!-- Enter description of the fix in this section --> Fixed FileResult initialization to properly preserve the filename and ContentType. ### Regarding Test Case Picking an image is not possible in a test. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #33348 <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> **Tested the behavior in the following platforms.** - [ ] Android - [ ] Windows - [x] iOS - [x] Mac | Before | After | |---------|--------| | **iOS**<br> <video src="https://github.com/user-attachments/assets/47360519-a071-47eb-9a79-66069f8711a8" width="300" height="600"> | **iOS**<br> <video src="https://github.com/user-attachments/assets/47a43e9d-c90f-4c79-ac81-779e50198cff" width="300" height="600"> |
PureWeen
added a commit
that referenced
this pull request
Jan 25, 2026
## What's Coming .NET MAUI inflight/candidate introduces significant improvements across all platforms with focus on quality, performance, and developer experience. This release includes 16 commits with various improvements, bug fixes, and enhancements. ## Checkbox - [Android] Implement material3 support for CheckBox by @HarishwaranVijayakumar in #33339 <details> <summary>🔧 Fixes</summary> - [Implement Material3 Support for CheckBox](#33338) </details> ## CollectionView - [Android] Fixed EmptyView doesn’t display when CollectionView is placed inside a VerticalStackLayout by @NanthiniMahalingam in #33134 <details> <summary>🔧 Fixes</summary> - [CollectionView does not show an EmptyView template with an empty collection](#32932) </details> ## Essentials - [Windows]Fix NullReferenceException in OpenReadAsync for FileResult created with full path by @devanathan-vaithiyanathan in #28238 <details> <summary>🔧 Fixes</summary> - [[Windows] FileResult(string fullPath) not initialized properly](#26858) </details> ## Image - Fix Glide IllegalArgumentException in MauiCustomTarget.clear() for destroyed activities by @jfversluis via @Copilot in #29780 <details> <summary>🔧 Fixes</summary> - [java.lang.IllegalArgumentException: You cannot start a load for a destroyed activity - glide](#29699) </details> ## Label - [Android] Fix for Label WordWrap width issue causing HorizontalOptions misalignment by @praveenkumarkarunanithi in #33281 <details> <summary>🔧 Fixes</summary> - [[Android] Unexpected Line Breaks in Android, Label with WordWrap Mode Due to Trailing Space.](#31782) - [Label not sized correctly on Android](#27614) </details> - Fix to Improve Flyout Accessibility by Adjusting UITableViewController Labels by @SuthiYuvaraj in #31619 <details> <summary>🔧 Fixes</summary> - [Navigation section present under hamburger are programmatically define as table :A11y_.NET maui_User can get all the insights of Dashboard_Devtools](#30894) </details> ## Mediapicker - [Regression][iOS] Fix MediaPicker PickPhotosAsync getting file name in contentType property by @devanathan-vaithiyanathan in #33390 <details> <summary>🔧 Fixes</summary> - [[iOS] MediaPicker PickPhotosAsync getting file name in contentType property](#33348) </details> ## Navigation - Fix handler not disconnected when removing non visible pages using RemovePage() by @Vignesh-SF3580 in #32289 <details> <summary>🔧 Fixes</summary> - [NavigationPage.Navigation.RemovePage() fails to disconnect handlers when removing pages, unlike ContentPage.Navigation.RemovePage()](#32239) </details> ## Picker - [Android] Fix Picker IsOpen not reset when picker is dismissed by @devanathan-vaithiyanathan in #33332 <details> <summary>🔧 Fixes</summary> - [[Android] Picker IsOpen not reset when picker is dismissed](#33331) </details> ## Shell - [iOS & Catalyst ] Fixed IsEnabled property should work on Tabs by @SubhikshaSf4851 in #33369 <details> <summary>🔧 Fixes</summary> - [[Catalyst] TabBarBackgroundColor, TabBarUnselectedColor, and IsEnabled Not Working as Expected in Shell](#33158) </details> - [iOS,Windows] Fix navigation bar colors not resetting when switching ShellContent by @Vignesh-SF3580 in #33228 <details> <summary>🔧 Fixes</summary> - [[iOS, Windows] Shell Navigation bar colors are not updated correctly when switching ShellContent](#33227) </details> - [iOS] Fixed Shell navigation on search handler suggestion selection by @SubhikshaSf4851 in #33406 <details> <summary>🔧 Fixes</summary> - [[iOS] Clicking on search suggestions fails to navigate to detail page correctly](#33356) </details> ## Templates - Fix VoiceOver doesnot announces the State of the ComboBox by @SuthiYuvaraj in #32286 ## Xaml - [XSG][BindingSourceGen] Add support for CommunityToolkit.Mvvm ObservablePropertyAttribute by @simonrozsival via @Copilot in #33028 <details> <summary>🔧 Fixes</summary> - [[XSG] Add heuristic to support bindable properties generated by other source generators](#32597) </details> <details> <summary>📦 Other (2)</summary> - [XSG] Improve diagnostic reporting during binding compilation by @simonrozsival via @Copilot in #32905 - [Testing] Fixed Test case failure in PR 33574 - [01/19/2026] Candidate - 1 by @TamilarasanSF4853 in #33602 </details> **Full Changelog**: main...inflight/candidate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue Details
The FileResult constructor was being called with (filePath, fileName) but the second parameter expects a MIME type, not a filename. This caused the filename to be stored as ContentType.
Description of Change
Fixed FileResult initialization to properly preserve the filename and ContentType.
Regarding Test Case
Picking an image is not possible in a test.
Issues Fixed
Fixes #33348
Tested the behavior in the following platforms.
Before.mov
After.mov