trilium
trilium copied to clipboard
(Feature request) how to unlock the limit max imported file size to 250 MiB
Describe feature
Could provide a custom or unofficial method( like some sql command) to unlock the limit max imported file size to 250 MiB? thanks.
Additional Information
No response
Even if that is possible, I don't think it's relevant due to such restriction being added for a reason: Trillium notes is not meant to be used for storing large files and problems may occur if tried to do so.
Also - there is a hard limit, because of how the sync protocol works, at something around 400-512MB simply because the content is stored in a String and it has a maximum capacity. Though the artificial limit in the code is 250MB which is reasonable IMO. https://github.com/zadam/trilium/issues/2688 https://stackoverflow.com/questions/68230031/cannot-create-a-string-longer-than-0x1fffffe8-characters-in-json-parse
https://github.com/v8/v8/commit/ea56bf5513d0cbd2a35a9035c5c2996272b8b728
// The max length is different on 32 and 64 bit platforms. Max length for // 32-bit platforms is ~268.4M chars. On 64-bit platforms, max length is // ~536.8M chars.
Although Trilium doesn't provide 32-bit builds, it's still possible to build it yourself, so I think it's better to stay conservative with 250 MB. I might consider adding some way to override that to 500 MB.
Today, the news says Evernote has been bought by Bending Spoons. So I try to transfer my evernote data into trilium, and get this Import failed: Cannot upload file because it excceeded max allowed file size of 250 MiB
error.
I had been using evernote for several years, and there were a lot of notes there. The largest enex file is around 1.5GB.
Kinda stucked here.
TBH when creating this limit I did not think about e.g. ENEX or ZIP import which might (or might not) have the same issue as importing one "monolithic" file.
I've added TRILIUM_NO_UPLOAD_LIMIT
env. variable, setting it will remove any limit. Importing large files is "use at your own risk" since it's difficult to predict how will the app behave.
I am also looking for this feature