Files disappears from file column after refresh

Hello,
I’m trying to develop an automation tool with python that creates an item with two subitems, when each subitem has a number of link columns and file columns.
So far, all works. After running the automation script, all .tsv files and links are uploaded successfully.
But after I refresh my browser, all the files are permanently disappears.

  • Response’s status code is 200.
  • Query returns all the data about the file (id, name etc.)
  • File is still exist in local.

Don’t know where else to debug and how to troubleshoot.
Not sure where the problem comes from.

hi @nirpev

Welcome to the community! How did you upload the file? Did you update a file column with an existing assetId? The only way you can store a file through the API is to stream the file from your code. The behavior you are describing looks like you copy the metadata of the file (including the assetId) and that won’t work.

Hi @basdebruin, thanks.
I am indeed streaming the file through code, inspired from another topic in the community:

query = 'mutation ($file: File!) { add_file_to_column (file: $file, item_id:' + item_id +\
                ', column_id:' + column_id + ') {id, name }}'
payload = {'query': query}
files = [('variables[file]', (file_name, open(file_path, 'rb'), 'application/octet-stream'))]
result = requests.post(url=self.api_url, data=payload, headers=self.headers, files=files)

No asset id is used here. Still, after the files are successfully uploaded to the column, they disappear after a browser refresh.

Hello @nirpev !

Could you please send us an email to appsupport@monday.com with all of this information so we can take a closer look?

Looking forward to hearing from you :slightly_smiling_face:

Cheers,
Matias