Skip to content

Comments

[Regression][iOS] Fix MediaPicker PickPhotosAsync getting file name in contentType property#33390

Merged
PureWeen merged 2 commits intodotnet:inflight/currentfrom
devanathan-vaithiyanathan:fix-33348
Jan 14, 2026
Merged

[Regression][iOS] Fix MediaPicker PickPhotosAsync getting file name in contentType property#33390
PureWeen merged 2 commits intodotnet:inflight/currentfrom
devanathan-vaithiyanathan:fix-33348

Conversation

@devanathan-vaithiyanathan
Copy link
Contributor

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.

  • Android
  • Windows
  • iOS
  • Mac
Before After
iOS
Before.mov
iOS
After.mov

@dotnet-policy-service dotnet-policy-service bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Jan 6, 2026
@vishnumenon2684 vishnumenon2684 added the community ✨ Community Contribution label Jan 6, 2026
@sheiksyedm sheiksyedm marked this pull request as ready for review January 6, 2026 13:24
Copilot AI review requested due to automatic review settings January 6, 2026 13:24
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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

@devanathan-vaithiyanathan devanathan-vaithiyanathan changed the title [iOS] Fix MediaPicker PickPhotosAsync getting file name in contentType property [Regression][iOS] Fix MediaPicker PickPhotosAsync getting file name in contentType property Jan 7, 2026
Copy link
Member

@jfversluis jfversluis left a comment

Choose a reason for hiding this comment

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

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! 🚀

@jfversluis jfversluis added this to the .NET 10.0 SR3 milestone Jan 8, 2026
@PureWeen PureWeen modified the milestones: .NET 10.0 SR3, .NET 10.0 SR4 Jan 14, 2026
@PureWeen PureWeen changed the base branch from main to inflight/current January 14, 2026 22:22
@PureWeen PureWeen merged commit 84a9124 into dotnet:inflight/current Jan 14, 2026
23 checks passed
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
@github-actions github-actions bot locked and limited conversation to collaborators Feb 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-essentials-mediapicker community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration platform/ios

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[iOS] MediaPicker PickPhotosAsync getting file name in contentType property

5 participants