Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot save invoice: "Item must be less than 10 KB" #2

Open
wzulfikar opened this issue Jan 27, 2021 · 3 comments
Open

Cannot save invoice: "Item must be less than 10 KB" #2

wzulfikar opened this issue Jan 27, 2021 · 3 comments

Comments

@wzulfikar
Copy link

When I try to save my invoice with several items (8 items to be precise), it says "Item must be less than 10 KB". I assume the 10 KB limit is the total size of all items (payload) that's being stored.

If that so, is it a UI-imposed limit or a limitation from Userbase itself?

image

Cheers!

@j-berman
Copy link
Owner

Good catch :)

That's imposed by Userbase, with some relevant notes:

  1. The underlying items stored in Prinvoice are unnecessarily large because they have a ton of unnecessary whitespace. If you open up the dev console while you're creating an invoice, you'll see clean SQL statements with all that extra unnecessary whitespace. That whitespace could easily be trimmed, and items (and invoices) could therefore be much larger.

  2. I could change userbase-sql.js a bit to store larger SQL statements as files, and that would work ok. I'm actually using this pattern in a new piece of software I'm working on that's using Userbase, I'll link to it here to show you how it can be done :)

@wzulfikar
Copy link
Author

I see. Thanks for the explanation! Looking forward for the link so I can try it in my machine.

@j-berman
Copy link
Owner

j-berman commented Feb 9, 2021

Check this out:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants