Hello, I am using the SDK to upload an image to a column on a board, and I’m receiving a 500 error. I am passing the file through an HTML input which returns a File
e.g:
File: {name: 'sample.pdf', lastModified: 1653471602427, etc...}
I am using the SDK as stated in this post: Announcement: Uploading files to monday.com has just become easier :)
My code:
const RESPONSE = await monday.api(
`
mutation addFile($id: Int!, $file: File!) {
add_file_to_column(item_id: $id, column_id: "files", file: $file) {
id
}
}
`,
{
variables: {
id: parseInt(id),
file,
},
},
);
When I run the mutation I get a 500 POST error from the https://api.monday.com/v2
url.
Hoping someone can help me understand what’s going wrong. Cheers!