-
Notifications
You must be signed in to change notification settings - Fork 381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uploading data using the FluentInputFile component is extremely slow on mobile devices. #2773
Comments
I can't see how the component would behave differently on Desktop and Mobile when everything works using HTML and JavaScript code. To check, I uploaded a 60 MB file from my iPhone to the fluentui-blazor.net site (SaveToTemporaryFolder mode but also in Buffer mode, as below) and the file was uploaded in a few seconds. Can you check that your mobile doesn't have a firewall or antivirus software that filters transfers? Or if your network configuration interfering with the upload? Have you tried this on other mobile devices? iPhone-Upload.mp4 |
Hi @dvoituron , thanks for the looking into this. I agree it's strange and I can't wrap my head around it. I've actually already taken the initiative and tried it on a couple of different devices. I've tried another (more recent) Samsung S8 and I've also tried a Samsung Galaxy Tab A8 with a different browser (Samsung Browser) and I'm getting the same problem on both. So that's three devices on android that I'm having this problem with. I've taken some videos to show the difference. Here's the desktop version (Windows 11, Microsoft Edge) Here's the mobile version. (Samsung S7, Edge Mobile) [I've had to cut off the video as it takes too long to upload] I'm actually uploading data to the Blazor app and then sending that through to another API in front of my storage pool but that extra process only happens after the file has been uploaded so it has no bearing on the upload itself. I've temporarily stripped all of that out so the code is essentially the exact same as you see on the documentation site and I'm still getting this problem. The app is running on an internal RHEL server behind nginx. I've investigated Nginx and there doesn't seem to be anything weird happening on that front when I upload from a particular device. I'm not quite sure where to go from here because, as you say, its only using the same Javascript and HTML behind the scenes. Edit I know this is kind of a strange thing to do but I've just emulated an Android device (API Level 34) on my Windows 11 PC via Android Studio and I've tried to upload the same 40mb file using Chrome. I'm getting exactly the same problem with the same low rate of speed on this emulated device. I don't currently have an IOS device to test if its Android specific. |
Have you tried using another InputFileMode? I'll try to find an Android device to test on my network. |
No I haven't tried another mode, I'll have to give it a go when I get in later. I've just tied to upload data to the documentation site from my android device and it won't work for me. It's just stuck there. |
It is terribly slow from my S22 Pro to the demo site as well. So it seems to be an Android thing. |
🐛 Bug Report
Hi.
I'm uploading data on my own network, everything is connected locally, nothing is being sent over external or mobile networks. I'm using Blazor Server. Here's my
FluentInputFile
on my page:Here's the code which runs on
OnProgressChange
, I'm just appending the buffer to a file on the server in the same way as the documentation site suggests:I've got a problem with my data upload component but only on mobile devices.
I've got a 40mb file for reference. If I upload it from Edge on my workstation it successfully gets uploaded in around 3 seconds. If I upload this same file on my Samsung S8 via Edge mobile, it takes around 4 minutes which is strange. I've tried all sorts of different buffer sizes to not much effect (Current is 10240). This happens both in debug mode and also when I've fully deployed it to my internal server.
I've connected my phone to my workstation and profiled the interaction using the Edge remote profiling tools. I start the upload around the 6 second mark and as you can see it's not uploading cleanly in the same way as on desktop as you can see in the profile below this one. I've included the JSON profiling data for both instances at the end of this post.
Mobile (First 20 seconds)
Desktop
🌍 Your Environment
DotNET version: 8.0.401
Fluent UI Blazor library version: 4.10.1
Traces (OneDrive)
DESKTOP
MOBILE
The text was updated successfully, but these errors were encountered: