Given that all notes sync, and there's no 10MB limit on desktop, I don't see why there's a 10MB limit on mobile. Unless of course, adding a new note and encrypting on mobile is somehow more intensive than syncing it to add, and decrypting. I can't imagine how that would be the case.
I don't think so, I believe it reads and encodes in chunks.
Indeed it's by chunks.
In that case then I would expect a 100MB file to incur no additional RAM requirements over 10MB.
That said, I experienced problems syncing large attachments during my initial sync, as I mentioned here. It could have been caused by file system sync though. I'll test soon.
I synced and tried to decrypt a 17MB PDF file to my phone. It synced just fine, and decrypted just fine.
So, we have a situation where I can get a larger than 10MB attachment into the phone, but have to sync it over from desktop to do so.
Yes, Caleb referenced the line in the code that is responsible for that. It's an oversight in the code for mobile.
But according to Laurent, it's intended:
My point was that I don't see a reason for it, since it shouldn't affect old phones, per the RAM utilization discussion above. Furthermore, it can be circumvented by adding the larger attachments through desktop.
Yeah, seems like it would be valuable for the limit to be 100mb, or even 50. Right now, the limit is effectively 10mb, and the uncertainty about policy (caused by different limits on desktop vs mobile) is harmful
I don't think the desire to support old devices is a good enough reason to cause all this confusion. The app should have one clear limit, on desktop and mobile, or no limit on either. Imo, Joplin should simply give you a warning when you try to attach a big file, and it should do that consistently on all platforms. The user could then check a box that says "ok, don't tell me again"
Like, what we're saying is that old devices might take a long time to decrypt all the chunks of a file? Yeah, that's their problem. Users should just be aware of the tradeoffs, and know what to expect, right?
I'll add to this. I just tried adding a 23MB PDF to a note on Windows desktop Joplin. It added and synced just fine.
On mobile it synced, but the attachment either didn't download or didn't decrypt.
I just synced a 1000 pages PDF of 44Mb sucessfully from W10 (2.0.8) to Android (2.0.1) via a NextCloud server using E2EE. My Fairphone 3+ took over 5 minutes decrypting it, but hey, once the job is done its's done: it just works!
Repeated the process with a 149Mb PDF file and it seems the 100Mb limit has been removed, because it synced too without issues or advisories. This file took almost 20 minutes to decrypt, as expected, and now opens perfectly from within the Joplin app. Very happy with this!
The files occupy 75Mb and 258Mb respectively on the server though, almost double their original size. is this due to the encryption?
Yes, encrypted files are roughly twice the size of the orignal
Did something change somewhere and I missed a changelog? I thought we were limited on Android to 10MB attachments and decryption would fail?
This has been increased to 100MB around a year ago.
I thought my experience in February '21 was different, but perhaps I did something wrong or had an old version somewhere. I'll have to try again.