marcrobledo / RomPatcher.js

An IPS/UPS/APS/BPS/RUP/PPF/xdelta ROM patcher made in HTML5.
https://www.marcrobledo.com/RomPatcher.js/
Other
656 stars 133 forks source link

Can’t select IPS file in iPhone #12

Closed jamescastells closed 1 year ago

jamescastells commented 4 years ago

On an iPhone, I access the page and if I click the “patch file” button I can browse the files in my Files app but the IPS file is not selectable. I can however select the ROM by clicking in “ROM file”.

marcrobledo commented 4 years ago

I do not own an iPhone, so I cannot test it there :-(

I'll leave the issue open, just in case someone can help.

iMonZ commented 4 years ago

I have an iPhone but the problem is,

That you need to enable only for safari that you could select every file extension type! This would fix this problem! Because you can currently only select .zip files at the patch region (The Rom region works without a problem)

iMonZ commented 4 years ago

Edit: This is not an iPhone problem This is only an Safari problem with other browsers everything works as expected

marcrobledo commented 4 years ago

Is this happening with current and most up to date Safari versions? Or is it happening with old versions?

According to these: 1, 2 and 3, the input type="file" accept="" accept attribute. But answers and solutions are quite outdated.

I could fix it by adding a dirty patch for Safari, but I'd need to confirm this is also happening in most recent versions.

asc6 commented 3 years ago

I know it's still a beta but I ran into this issue on iPadOS 14 today. It seems to be the exact same problem. I can upload a zip file from the file explorer but I can't upload bps files. Works fine from macOS Catalina (don't have Big Sur installed) in Safari so it seems to be just a mobile Safari bug. I will file a bug report with Apple on mobile safari ignoring parts of the accept attribute and hopefully they can fix it.

marcrobledo commented 3 years ago

So looks like it's just a Safari Mobile issue.

Commit a4eb4b1 adds a dirty fix for it (what it does is just simply removing the accept="" attribute when loading page. I haven't tested it with Safari Mobile (I don't own any iOS device), but it should work.

Let me know if it fixes it. Make sure you are using RomPatcher.js 2.3b.

seajaysec commented 2 years ago

Hey just wanted to share that this is still broken on mobile safari on iOS 15.

ghost commented 2 years ago

I also wanted to share that I can't seem to get it working with Safari on macOS Monterey, once I select either the mod or the rom, the browse buttons are greyed out indefinitely and nothing happens.

Seems to work if I use https://hack64.net/tools/patcher.php though.

iMonZ commented 2 years ago

Works for me issue can be closed now.

@marcrobledo maybe you can add the desktop safari user agent either because currently you only mention Mobile Safari.

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.1 Safari/605.1.15

On some iOS device like mine the Desktop user agent is set by default which would make this patch unusable.

seajaysec commented 2 years ago

@iMonZ - The issue remains, on mobile Safari at least, and shouldn't be closed.

marcrobledo commented 2 years ago

Is this still happening?

seajaysec commented 2 years ago

Is this still happening?

No! Just tested and it's working great now. Thank you!!

marcrobledo commented 2 years ago

No! Just tested and it's working great now. Thank you!!

Glad to hear that! :-)

@marcrobledo maybe you can add the desktop safari user agent either because currently you only mention Mobile Safari. If I do that, then real desktop Safari users would also be affected and wouldn't be benefited from the accept attribute. According to caniuse, the desktop Safari does support it correctly.

I figure setting Desktop user agent in mobile Safari does not keep the iPhone/iPad string in it (correct me if I'm wrong!), so it would be impossible to distinguish faked useragent from real desktop browsers.