firmware icon indicating copy to clipboard operation
firmware copied to clipboard

Can’t upload files via webUI on Iphone

Open ghost opened this issue 1 month ago • 6 comments

Describe the bug: Files will not send via webUI using iPhone

Steps To Reproduce: Connect to Bruce via iPhone hotspot AP, able to log in to Bruce.local and see files. I’m able to delete/edit files, but cannot upload html files.

  • Device used: iPhone 12

Expected behavior: Upload small html/txt files. It works on PC via home network.

Actual behavior: I’m able to select the file I’m trying to upload via the files app on iPhone, but after selecting and hitting “done”, the loading bar on the webUI just briefly pops up for a split second and the file isn’t uploaded.

Additional context / logs: I’ve successfully uploaded files via PC on my home network using the webUI, but it just will not work via my iPhone. I’ve tried multiple browsers.

ghost avatar Oct 29 '25 17:10 ghost

Found a way?

Skatetop avatar Oct 30 '25 08:10 Skatetop

I have found the issue, on iOS the basic auth credentials are not being used when uploading the file. I am looking into solutions.

emericklaw avatar Oct 30 '25 19:10 emericklaw

I don't have an iPhone, but I imagine it could be due to an upload block caused by the new version. The problem is that even if you switch to a browser with fewer resources, most use WebView behind it, which means it would theoretically have the same behavior. I found little information about your similar situation. I imagine that both for this case and for other future cases (perhaps Evil Portal) we will need to think about implementing SSL. In this case with https (in theory) the iPhone would allow uploading (also access to the camera and microphone).

https://developer.apple.com/documentation/security/preventing-insecure-network-connections?

IncursioHack avatar Oct 30 '25 21:10 IncursioHack

Not great news, unfortunately this is a quirk/security restriction within iOS browsers. On iOS all web browers use the same underlying Safari code so using a different browser would not help. Even my workarounds were not successful.

I am working on a concept to replace basic auth with more modern forms authentication.

emericklaw avatar Oct 30 '25 21:10 emericklaw

Certified with RSA4096 would not be supported by the ESP32 due to the lack of RAM, at most an RSA2048 or ECC. I think that even with a self-signed certificate, the current Safari is still not friendly with this operation. I will research to see if changing the library to ESP_HTTPS_SERVER, which would be an evolution of ESP_HTTP_SERVER with TLS1.2/TLS1.3, PEM and the like. It should also have a lower heap consumption, the ESP32 chip has a significant improvement for mbedTLS. I understand that perhaps this is the best path for both WebUI and Evil Portal and other functions.

IncursioHack avatar Oct 30 '25 21:10 IncursioHack

Found a way?

If you have the latest M5 Launcher (2.6.3) you can upload files via iPhone through the wedUI and place them in the folders you need. It worked for me with a jpg image using Brave browser. I was able to create a new folder “/img” and upload the jpg directly there. Worked like a charm.

p1n3tr33s avatar Nov 07 '25 16:11 p1n3tr33s