I have created JSON that byte.length is too large, and when I try to use the api java:
documentClient.createDocument(
getTodoCollection().getSelfLink(), document, null,
false)
returns an
DocumentClientException: Message: {"Errors":["Request size is too large"]}
Is there any way to save this kind of files in the documentDB?
From DocumentDB limits and quotas
page, maximum size of a document can be 512 KB 2 MB. If your JSON size is more than that, you will get this error.
If the size of your document is more than 512 KB 2 MB, then you can't save the document as is in DocumentDB. One thing you could do is save the JSON in Blob Storage as a block blob and save the Blob URL in DocumentDB.
P.S. For some reason I thought the size of an attachment in DocumentDB is 2 MB and I thought of suggesting that but it seems they have changed it to 512 KB as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With