Domino Data Access (Update attachments)

Hi!

I try to update the attachment in a document. But the server returns an error 400. I send the request:
PATCH http://servername/prodoc/projects/ob+6.nsf/api/data/documents/unid/DE3B5CD79A8DE3BEC3257DB60023481C?computewithform=true http://servername/prodoc/projects/ob+6.nsf/api/data/documents/unid/DE3B5CD79A8DE3BEC3257DB60023481C?computewithform=true Content-Type: application/json {“Body”: {“type”:“multipart”,“content”: [ { “contentType”:“multipart/mixed; Boundary="0__=4CBBF75EDFB8107C8f9e8a93df938690918c4CBBF75EDFB8107C"” }, { “contentType”:“multipart/alternative; Boundary="1__=4CBBF75EDFB8107C8f9e8a93df938690918c4CBBF75EDFB8107C"”, “boundary”:“–0__=4CBBF75EDFB8107C8f9e8a93df938690918c4CBBF75EDFB8107C” }, { “contentType”:“text/plain; charset=US-ASCII”, “data”:“(See attached file: Drawing12.dwg)”, “boundary”:“–1__=4CBBF75EDFB8107C8f9e8a93df938690918c4CBBF75EDFB8107C” }, { “contentType”:“text/html; charset=US-ASCII”, “contentDisposition”:“inline”, “data”:“(See attached file: Drawing12.dwg)”, “boundary”:“–1__=4CBBF75EDFB8107C8f9e8a93df938690918c4CBBF75EDFB8107C” }, { “contentType”:“image/vnd.dwg; name=“Drawing12.dwg””, “contentID”:“1__=4CBBF75EDFB8107C8f9e8a93df93869091@local”, “contentDisposition”:“attachment; filename=“Drawing12.dwg””, “contentTransferEncoding”:“base64”, “data”:“”, “boundary”:“–0__=4CBBF75EDFB8107C8f9e8a93df938690918c4CBBF75EDFB8107C” } ] } }
What could be the problem? Or what am I doing wrong?

I would be grateful for your help.

Subject: Unbalanced quotes in the JSON input …

I was able to reproduce the problem with a variation of your input. To fix it I escaped the quotes surrounding the file name. See the bold text below:

{
“contentType”:“image/vnd.dwg; name="Drawing12.dwg"”,
“contentID”:“1__=4CBBF75EDFB8107C8f9e8a93df93869091@local”,
“contentDisposition”:“attachment; filename="Drawing12.dwg"”,
“data”:“”,
“boundary”:“–0__=4CBBF75EDFB8107C8f9e8a93df938690918c4CBBF75EDFB8107C”
}

Hope this helps.

– Dave