Hi Cindy,
Can you share any more details on the error that you're receiving - what's the specific content length error that's being returned? There's a few content length messages that come to mind that it could potentially be. If it would be beneficial to share private code samples you can send them to capsule support at
sup...@capsulecrm.com and we'll pick up the conversation there.
When you make a HTTP request to the attachment upload endpoint we require that the content-length HTTP header is set to byte size of the file you're uploading. If this is missing or invalid you'll receive a 415 or 411 HTTP response respectively. There's also a maximum file size of 25mb, so it's worth ensuring the file you're uploading is smaller than this.
Daniel