Back

Max string size 500 chars?

  • 0
  • Self Hosted
  • Web
Rich
29 Jul, 2023, 18:58

Is a maximum string size only 500 characters?

I need to store a few paragraphs of sanitized HTML to render some instructions on the frontend. What should I do?

TL;DR
The maximum string size is actually 1GB, but it's recommended to only set it to the size you need for your data. Someone had an error with 1,000 characters, so it's best to test and find the appropriate size. You mentioned needing 5,000 characters, but that shouldn't be a problem. As for storing paragraphs of sanitized HTML, you can consider using a different approach like storing it in a separate file or using a database specifically designed for handling larger amounts of text.
Drake
29 Jul, 2023, 19:01

Nope. What makes you say that?

Rich
29 Jul, 2023, 19:02

Ah I thought I read it in a previous support question. I would probably need 5,000 - is that manageable?

Drake
29 Jul, 2023, 19:06

Did you try it?

Rich
29 Jul, 2023, 19:08

yeah it's accepted it - I ask because I was reading a previous support question of someone who had no problem with 500 but as they were getting an error response from the server at 1,000. I didn't want to go all the way down the road configuring the database only find that it would be rejected in the API call.

Drake
29 Jul, 2023, 19:39

You should definitely just play around with the different sizes and see what size you need for your data.

The max size in 1.3 is 1GB, but that doesn't mean you should set it to that.

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more