Workaround for wix-data.update( ) limitation of 200kb

The API doc says “The maximum size of an item that you can update in a collection is 200kb.” (https://www.wix.com/velo/reference/wix-data/update)

(For now I’m assuming this means 200k bits rather than bytes because it’s a lower-case ‘b’ as opposed to 200kB meaning 200k Bytes )

In any case, is there a recommended way to deal with updating larger items? Perhaps insert the new revision of the record then delete the old one? Are their an downsides to an insert-new-delete-old method? (apart from performance)

Can I ask you how big your object is that needs more than referenced?

I do not see what good that would do you (insert-delete), since the insert has the same 200 KB (Bytes) limitation. Maybe you could tell us a bit more what you’re trying to achieve, so we can propose other solution, like another db-setup with 1-n relationship.

as @giri-zano said it’s 200KB (I believe it’s event 500KB).

The only way around is to split your content across multiple collection and fetch it via multiple query (a read operation is limited to 500KB as well).

If you can’t do that, I would store my data outside of Wix (Amazon S3, Google Storage, … ) and query it with Wix Backend

I was working with the idea that it was 200k bits since they have a lower case ‘b’ in the doco. This being 25kBytes - about a 2000 word essay or article would break this. Limiting the user input would be a solution in this case or splitting it over more records per @giri-zano . But, 200kBYTES is a whole different kettle of fish. Problem now solved.

Thanks everyone for your replies. 200kB (bytes) makes things a little different (eight times different! :wink: ) So, I’m OK now I reckon.

@giri-zano - Thanks for pointing that out. I had completely missed that! Your’re right - no point in the insert-delete idea :slight_smile:

@plomteuxquentin - Yes, I think that’s the best solution if it comes up - splitting the content. Thanks also for pointing out for 500kB. It would be good if Wix updated the API doco if that’s actually the case. I see there is a similar issue with bits/Bytes in the doco for wix-storage. I now wonder if it’s actually meant to be 50KB. (Introduction - Velo API Reference - Wix.com)

I see in the forum guidelines it says “Acknowledge help with likes, best answer, and upvotes”. How to I mark @plomteuxquentin 's as best answer please?

Unfortunately, you can’t mark it as Best Answer because this is a “Discussion” type post. You can only :heart: it.

Next time you create a post, choose “Question,” and then you can award Best Answer.

We’re also working on developing this feature for all post types, so hopefully that should be possible soon!