Page 1 of 2

nzb upload doesn't work on iOS

Posted: December 14th, 2022, 12:18 pm
by Tone866
If I try to upload the nzb file, I can see them, but the file is greyed out, like it isn't a nzb-file, but it is.
I have the issue with all files on different iOS devices.
I'm using iOS 15 and 16 and sabnzbd 3.5.1

Re: nzb upload doesn't work on iOS

Posted: December 14th, 2022, 12:38 pm
by sander
Can you post a screenshot, for example via https://postimages.org/ ?

Re: nzb upload doesn't work on iOS

Posted: December 14th, 2022, 12:59 pm
by Tone866
sander wrote: December 14th, 2022, 12:38 pm Can you post a screenshot ?
of course!

i postimg cc /j20q14qm/IMG-97-FC75-D5621-A-1.jpg

sorry for the crappy link, I'm too new and not allowed to post urls

EDIT: https://postimg.cc/gXsPXRZH

Re: nzb upload doesn't work on iOS

Posted: December 14th, 2022, 2:25 pm
by Tone866
So I tested it again and the problem is the "accept" Attribute in the "input" from the file upload.
For my understanding it's correct implemented, but for some reason, iOS seems to have a problem with it.
My guess is, that iOS has a problem with all filetypes, which it doesn't knows, because e.g. zip's are working.

My idea would be, to implement a switch, where we could disable the accept-Attribute in the upload.
Or maybe a webdev with iOS experience knows some tricks.

Re: nzb upload doesn't work on iOS

Posted: December 14th, 2022, 2:32 pm
by sander
When I use from my Linux laptop Chrome, by default the OS file browser will show NZB and ZIP, but in the right lower corner I can select All Files.

Is that possible on iOS?

Re: nzb upload doesn't work on iOS

Posted: December 14th, 2022, 2:43 pm
by Tone866
sander wrote: December 14th, 2022, 2:32 pm When I use from my Linux laptop Chrome, by default the OS file browser will show NZB and ZIP, but in the right lower corner I can select All Files.

Is that possible on iOS?
I just found the answer: Safari on iOS doesn't support it, you can see it here:
https://caniuse.com/input-file-accept
Safari on iOS just support file-types, but not the extension format.

So maybe my switch suggestion would be working.

Re: nzb upload doesn't work on iOS

Posted: December 14th, 2022, 3:09 pm
by sander
Interesting!

I tried from my Android phone, and it just allows all files.

Instead of making it YASS (Yet Another Sabnzbd Switch), can't it work server side? So if SABnzbd sees it's iOS, accept all file types ... ? Note: I don't know if that is possible server side.

EDIT: how does another browser on your iOS behave, for example Chrome on iOS?

Re: nzb upload doesn't work on iOS

Posted: December 14th, 2022, 3:49 pm
by Tone866
There are no really other browsers on iOS.. apple forces them all to use the same engine (webkit) as safari, so they all act the same.

On server side I think it‘s not possible to detect the os, but I‘m not entirely sure, but it should definitly be possible with js.

Re: nzb upload doesn't work on iOS

Posted: December 15th, 2022, 3:58 am
by jcfp
Tone866 wrote: December 14th, 2022, 2:25 pmMy idea would be, to implement a switch, where we could disable the accept-Attribute in the upload.
What makes you think that would work? Typical behaviour for a browser not implementing a certain attribute would be to ignore it rather than come up with some random restrictions of its own. The latter looks and feels very much like one of those decisions apple makes for everyone that locked themselves into their walled garden.

Since you mentioned zip files are allowed by ios, you might be able to use that as a workaround: sabnzbd is fine with nzb files stored in common archive types (zip, rar, 7z, gz, bz2). That feature is primarily intended for downloading multiple nzb files at once from an indexer or search engine, but works just fine with a single nzb.

Re: nzb upload doesn't work on iOS

Posted: December 15th, 2022, 5:50 am
by Tone866
jcfp wrote: December 15th, 2022, 3:58 am
Tone866 wrote: December 14th, 2022, 2:25 pmMy idea would be, to implement a switch, where we could disable the accept-Attribute in the upload.
What makes you think that would work?
I tested it and it worked.

It probably don‘t just ignores it because the attribute is partial implemented in Safari.

Re: nzb upload doesn't work on iOS

Posted: December 15th, 2022, 6:12 am
by safihre
We do have isMobile detection.
In case that's detected I could just clear the accept-parameter.

Re: nzb upload doesn't work on iOS

Posted: December 15th, 2022, 6:25 am
by sander
Ah, yes: https://github.com/sabnzbd/sabnzbd/blob ... r.basic.js -> isMobile

@tone866 if you speak javascript ... do you think you can get it working in there?

Re: nzb upload doesn't work on iOS

Posted: December 15th, 2022, 10:07 am
by safihre

Re: nzb upload doesn't work on iOS

Posted: December 15th, 2022, 10:42 am
by Tone866
safihre wrote: December 15th, 2022, 10:07 am I added it:
https://github.com/sabnzbd/sabnzbd/comm ... 873cf88e2e
Thank you!

Re: nzb upload doesn't work on iOS

Posted: December 15th, 2022, 10:52 am
by safihre
If you have a Github account you can download a fixed version here:
https://github.com/sabnzbd/sabnzbd/acti ... 3705613111