It looks like you're fine.

Couchbase Lite will automatically determine whether to use base64'd inline
attachments vs standalone multipart/related attachments.  I can't remember
what the cutoff size is, but I think it's around 10K.

The request being sent to IBM Cloud looks like this:
> --005D258A-9C60-4EFE-9E5B-41C6E2EEFC92


That's a standalone multipart/related attachment.


On Fri, Dec 1, 2017 at 12:27 PM, Brendan Duddridge <[email protected]>
wrote:

> 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
> <https://groups.google.com/d/msgid/mobile-couchbase/1fc6a203-edc3-47bb-a7ec-60cc3c1afa68%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CACSSHCGB0qRtu1ucR1-gbKKH5H0dqE8JgnWDXJFtVPPzvdP6rg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to