I’ve been working on uploading a file to an item, and I’ve been receiving some cryptic errors from the API. Here’s my code snippet:
return monday.api(`
mutation addFileToColumn($file: File!) {
add_file_to_column(
item_id: ${itemId},
column_id: "${columnId}",
file: $file
) {
id
url
name
}
}
`, {
variables: { file },
})
where itemId is for sure an existing item (I do this immediately after creation), columnId is files
, and file
is a javascript File
instance.
I’ve seen oReleased] File upload via Monday's SDK client side - #3 by pepperaddict, which seems like it might be a workaround. But I wanted to report this to see whether there’s something obvious I’m missing and doing wrong. Note I haven’t tried this in a non-dev environment, so maybe the 500 represents some of the CORS errors being seen in the above topic?
Thanks,
Jake