trilium icon indicating copy to clipboard operation
trilium copied to clipboard

(Feature request) how to unlock the limit max imported file size to 250 MiB

Open zomboo opened this issue 2 years ago • 6 comments

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

zomboo avatar Sep 26 '22 00:09 zomboo

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.

XXXJetfireXXX avatar Sep 26 '22 14:09 XXXJetfireXXX

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

sigaloid avatar Sep 26 '22 15:09 sigaloid

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.

zadam avatar Sep 26 '22 18:09 zadam

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.

1

Kinda stucked here.

Nriver avatar Nov 17 '22 02:11 Nriver

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.

zadam avatar Nov 17 '22 21:11 zadam

I am also looking for this feature

passionate2023 avatar Aug 15 '23 14:08 passionate2023