Updating an Existing Row for an Uploaded Image

I am following this guide to upload a file via the API to a file field in my database.
How to upload files via URL with the Baserow API

Up to Step 6 this works, I can upload the file to your server and I get a response array with the name of the uploaded file.

Uploading File Upload via API - Success

Updating Row for Uploaded File - Does not work
My problem is with step 7 when I want to attach this newly uploaded file to my file field in the database table. As per your documentation this should be a PATCH request now for the endpoint /api/database/rows/table/[TableId]/[RowId]/

https://api.baserow.io/api/redoc/#tag/Database-table-rows/operation/get_database_table_row

My questions:

  1. The API response of the uploaded image “name” - is ending with a dot “.”. Why is that so? It seems there is a file type to be added but the response is cutting this off.

  2. When I tried to call the API endpoint to update the file field for the uploaded image, whatever I try, I get the following error message below:

This is what I entered:


I tried with various combinations but this is just not working. I tried

  • submitting the name field without and with the file type
  • I tried submitting the request in the body and the query field

I am missing something. Why is this not working?

@Juliet, could you please check out this issue with step 7? :slightly_smiling_face:

@juliet and @olgatrykush any update on this? How do I correctly attach an uploaded image to a baserow table?

Hello @artoflogic,

The API response of the uploaded image “name” - is ending with a dot “.”. Why is that so? It seems there is a file type to be added but the response is cutting this off.

The extension will be excluded if Baserow is unable to determine the extension to use for the file. This should not be an issue as the filename remains valid and can be used as it.

When I tried to call the API endpoint to update the file field for the uploaded image, whatever I try, I get the following error message below:

I was able to replicate this issue.
The comma after the closing square bracket ⁠ ] ⁠ makes the body an invalid JSON document. Remove it and try again.
Also remove the extension you’ve added as that will make the filename invalid.

  "field_012345”: [
    {
      "name": “{{9.body.name}}"
    }
  ]
}```

Dear @Juliet ,

Thank you. Now the API Call works.

The only remaining issue now is that the uploaded image thumbnail in the file column shows empty. I think some more attributes are missing.

This is now corrected but I guess there are more attributes needed:


URL: []
thumbnails: empty
visible_name: []
name: []
size: 93752
mime_type: text/html
is_image: false
image_width: empty
image_height: empty
uploaded_at:  2024-12-17T00:12:40.537674+00:00

Would you know how to correctly enter the attributes? I am uploading a png image.