Work around for the character limit when storing Forge Storage API

Hi all, I wanted to ask if there was any solution to get around the limit of characters that can be saved via forge.set('key', value), I had thought of saving them in chunk but it doesn’t work.

and another question, when i then take the data how can i merge the chunks according to you?

Hi @MauroRemondi,

Do you mean the storage.set(‘key’, value) ?

Can you tell me a little bit more about the size / type of data you’re planning to store?

Cheers,
Melissa

yeah sorry i mean storage.set(‘key’, value) and i have an array of objects and the error is
Content for key "value" was 325316 characters, but should be at most 131072 characters
my idea was to split the value in chunks loop the array of chunks and save the chunk with key: value{index of loop}

but another question that i have how can i get all the chunks?

Hi @MauroRemondi,

You’ll probably need to split your array into smaller arrays and store it that way. As far as I’m aware, there’s nothing implemented within the forge storage api to break data into smaller key/value pairs and track it automatically, so you will most likely need to implement this yourself within your app.

I hope this explains.
Cheers,
Mel