This is what they told me:

For ordinary attachments, there is no limitation on the size. You can 
upload any attachment as you like. But for inline attachment, there is a 
limitation because inline attachments are attachments included as part of 
the JSON content. The document size limit on the old Cloudant service is 
64M.


But I don't do inline attachments as far as I know. I use the 
setAttachmentNamed: function like this on my CBLModel object:

[self.formEntry setAttachmentNamed:filename

withContentType:mimeType

contentURL:url];


The request being sent to IBM Cloud looks like this:


--005D258A-9C60-4EFE-9E5B-41C6E2EEFC92

Content-Length: 8960

Content-Type: application/json


{"_attachments":{"A-Clean-IND-Long-Beach-Blue-Metallic-BMW-X5-M-Project-8.jpg":{"content_type":"image/jpeg","digest":"sha1-JZ1CrUxQlePeXnyIBs/RbAiHdjg=","follows":true,"length":1575753,"revpos":9}}
 
.... the rest of the JSON document....

--005D258A-9C60-4EFE-9E5B-41C6E2EEFC92

Content-Length: 1575753

Content-Disposition: attachment; 
filename="A-Clean-IND-Long-Beach-Blue-Metallic-BMW-X5-M-Project-8.jpg"

Content-Type: image/jpeg

... the image attachment data


So it would seem that because the total of the Content-Length from both 
parts is being used to determine if the request is too large or not rather 
than just the first part and the second part being treated as an 
attachment. The main CBLDocument part of the request is only 8960 bytes.

Is there a way to coax Couchbase Lite into telling it to use a separate 
request for attachments?

Thanks,

Brendan



>

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/1fc6a203-edc3-47bb-a7ec-60cc3c1afa68%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to