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

Hi, I know this topic is old, but I’ve just discovered exactly the same issue when using the API through Power Automate to upload a file.

@nirpev - did Monday provide a solution on this?

Thanks!

  • Steve

Hello @stevej401 and welcome to the community!

I hope you like it here :muscle:

Would you be able to please send an email over to appsupport@monday.com so we can take a closer look from there?

Please include:

  • The exact mutation you are sending (with the actual values and not the names of variables)
  • A timestamp of the last time this happened to you (you can try to reproduce this now and send over the data):
    *The user ID of the user whose API token is being used for the mutation
    *The board ID
    *The item ID
    *The date, hour, minute and location of your request

With this information we can help you look for the source of the issue :grin:

Looking forward to hearing from you over email!

Cheers,
Matias

I see this thread is old; but we’re facing the same problem mentioned here.

After a file is uploaded using Monday API we can see that file in the “Files” tab of the lead.

We can open the file preview (we’re uploading PDF and images only).

After some time (sec or mins) the uploaded files disappear; but we still can use the URLs to access them.

sample URL:

(https://{organizaton}.monday.com/protected_static/{ID}/resources/{anotherID}/large-title_picture_file.png)

Hello there @danielatgauge,

Does your board have a files column? And are you using that column’s column_id in the mutation?

If not, please add a files column and add that files column’s ID in the column_id field in the mutation and everything should work.

Let me know how that goes!

Cheers,
Matias

yes, it has a files column and the files are uploaded and we can see them in the “files” tab and use the preview and everything as expected

The problem is that suddenly the files disappear

Also, when the item is moved to a different board all files disappear and it takes minutes to see those files again in the “files” preview; unfortunately not all of the files attached on the original board become available on the new board

Hello again,

For us to be able to take a closer look into this and be able to open a report if needed, would you be able to please send all of this information over to appsupport@monday.com?

A screen recording of the exact steps you are taking to upload the file and the structure of your board would be fantastic!

Looking forward to hearing from you via email!

Cheers,
Matias

Hi @danielatgauge - this is definitely the same issue as I had.

There seems to be a technical difference between the “Files Gallery” and the “Files Column”
You can drag or upload files onto a project through the UI even if you don’t have an actual Files column. Doing that works fine, but if you use the API to add files they disappear from the UI.

However, if you add an actual Files column, the API upload does work, but you need to reference the Files column in your API POST

Check your API call and make sure you’re uploading to the actual Files column, not just the Files Gallery

  • Steve

That is correct @stevej401 ! Thank you for sharing!