maui: [Bug] Maui Blazor InputFile

The Blazor InputFile component doesn’t seem to work in a Maui Blazor app (Android). I receive no errors, it just doesn’t do anything when clicked and never hits the breakpoint within the method called by OnChange.

<InputFile OnChange="ImageFileChange" accept="image/jpeg, image/png, image/gif, image/webp" multiple />

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 17 (12 by maintainers)

Most upvoted comments

Thanks @jfversluis. I’ve verified this is working as expected without the storage permission, thus we should be good to go for Android 30+. 🎉

Optional PR: https://github.com/dotnet/maui/pull/5853/files

I don’t think you need to no. I actually don’t think it was ever required due to how we use proper intents and the picker. From my understanding. You also can’t really submit apps that target below 30 anymore.

@jamesmontemagno once your maui port goes through, I’ll double check this version works fine without any additional perms on Android 30+.

Just to confirm, we’ll still need to provide guidance to request for perms for Android < 30, correct?

Re-opening because I guess this fix is essentially incomplete.

I’ve put together a very general implementation of what I did and uploaded the project to https://github.com/ElliottBrand/MauiBlazorFileTransporter