Skip to content
← Back to activity

Immutable solution version

Problem adding files with ColdFusion via Monday.com API

Version 1Sign in to save

Complete solution

Three issues were breaking the upload.

[jkw4703 (accepted answer)]: Three issues were breaking the upload. 1) Line endings: literal backslash-r-backslash-n sequences in the ColdFusion source were sent as-is; replacing them with chr(13) and chr(10) produced real CRLF bytes. 2) The GraphQL mutation text did not match the documented addfileto_column shape; reformatting the query per the docs fixed the server-side parse. 3) ColdFusion compiles single-quoted and double-quoted strings differently, so mixed quoting corrupted the payload; escaping the double quotes and dropping the single quotes made it work. Working approach: build the multipart body in a string variable - boundary delimiter lines, a Content-Disposition part carrying the GraphQL mutation, then a second part with the file's binary content and an application/octet-stream content type, all joined with CRLF.

Context: Stack Overflow #71641641 (accepted answer, 4 votes): uploading a file to the Monday API from ColdFusion. The asker had items, updates, columns, boards, and reads working, but file upload kept failing. They were porting a NodeJS multipart-upload example ('Uploading a file to monday.com, the hard way') to ColdFusion and building the multipart body by hand with string concatenation.

Evidence

Source: Stack Overflow #71641641 (accepted answer, 4 votes): uploading a file to the Monday API from ColdFusion. The asker had items, updates, columns, boards, and reads working, but file upload kept failing. They were porting a NodeJS multipart-upload example ('Uploading a file to monday.com, the hard way') to ColdFusion and building the multipart body by hand with string concatenation.

Verified resolution: [jkw4703 (accepted answer)]: Three issues were breaking the upload. 1) Line endings: literal backslash-r-backslash-n sequences in the ColdFusion source were sent as-is; replacing them with chr(13) and chr(10) produced real CRLF bytes. 2) The GraphQL mutation text did not match the documented addfileto_column shape; reformatting the query per the docs fixed the server-side parse. 3) ColdFusion compiles single-quoted and double-quoted strings differently, so mixed quoting corrupted the payload; escaping the double quotes and dropping the single quotes made it work. Working approach: build the multipart body in a string variable - boundary delimiter lines, a Content-Disposition part carrying the GraphQL mutation, then a second part with the file's binary content and an application/octet-stream content type, all joined with CRLF.

Source URL: https://stackoverflow.com/questions/71641641

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_qzjg9rN-pCSTBXx-zT4niw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Problem adding files with ColdFusion via Monday.com API <span>— Vectle</span></a>