Back

[SOLVED] Invalid data: Value must be a valid string and at least 1 chars and no longer than 8192

  • 0
  • Functions
ianmont
5 May, 2023, 01:47

I'm trying to run a function and pass it a payload

however it returns an error saying:

"Invalid data: Value must be a valid string and at least 1 chars and no longer than 8192 chars"

it seems that it doesn't take the payload as a string , I attach a photo of my code and how I structure it and also a photo of how the data that I am passing would look like, thanks

TL;DR
The issue is with an error message: "Invalid data: Value must be a valid string and at least 1 char and no longer than 8192." There is a suggestion to create a new post instead of replying to an old thread. The user asks if they need to manually alter the source code or if there is a global variable to set the limit. Another user suggests using the storage API for longer data. The user asks if they can raise the limit. Another user asks the length of the string that is causing the issue. The user explains that they are trying to pass a payload to a function but receive the error message
Drake
5 May, 2023, 01:51

Can you check the length of the string?

ianmont
5 May, 2023, 01:55

The response is: "length":146165

Drake
5 May, 2023, 01:55

So that's longer than 8192 characters...

ianmont
5 May, 2023, 01:57

Oh true... my bad 🤔 is there any way I can raise that limit?

Drake
5 May, 2023, 01:58

Not without tweaking the source code.

Typically, if you're dealing with longer data, you should be storing it as a file using the storage API

ianmont
5 May, 2023, 02:01

thank you steven, I'll see how I do it <:appwriterocket:823996226894692403>

rohan
29 Jul, 2023, 10:10

even im facing this issue.. where are the limits set?

rohan
29 Jul, 2023, 10:19

do i need to manually alter the source code in these files? or is there any global variable where i can set the limit?

Drake
29 Jul, 2023, 15:12

Please create a new post instead of posting in an old thread

Drake
29 Jul, 2023, 15:13

[SOLVED] Invalid data: Value must be a valid string and at least 1 chars and no longer than 8192

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