Skip to main content

Hi there.


I am trying to upload a file into a file’s column executing cURL in Windows cmd. My petition is this:


C:/curl/bin/curl -X POST -H "Content-Type:application/json" -H "Authorization: MySecretToken" "https://api.monday.com/v2/file" -d "{ \\"query\\":\\"mutation add_file($file: File!) {add_file_to_column (item_id: itemID, column_id:\\\\\\"files__1\\\\\\" file: $file) {id}} \\" ,  \\"map\\":\\"{\\\\\\"image\\\\\\":\\\\\\"variables.file\\\\\\" } \\" ,  \\"image\\":\\"@/C:/PRUEBA.pdf\\" }"

But I cannot upload the file, I get this error:


{"errors":"{"message":"Variable $file of type File! was provided invalid value","locations":"{"line":1,"column":19}],"extensions":{"value":null,"problems":"{"path":"],"explanation":"Expected value to not be null"}]}}],

First, I tried using Postman and worked, then I look the cURL code snippet and try to re write it, but it does not work.


I would appreciate any recommendation.

Hello there @Feryohan343 and welcome to the community!


Would you be able to please fill this form (https://support.monday.com/hc/en-us/requests/new?ticket_form_id=13855862562962) so that our team can take a look into it?


Cheers,

Matias


Reply