Setting up attachments via API remains unnamed

Hi !
I’m trying to figure out why I can setup an URL but not a filename to the attachments when updating fields via API.
Here’s my code, which doesn’t work but doesn’t provide error at all:

for (var i = 0; i < result.airtable.selectQueryResult.rows.length; i++) {
await lib.airtable.query['@0.5.2'].update({
baseId: `app84oJeleATU5N53`,
table: `My bundles`,
where: [
  { 
  'Name': `${result.airtable.selectQueryResult.rows[i].fields['Name']}`
  }
  ],
limit: {
  'count': 0,
  'offset': 0
},
fields: {
  'QRCodeImage': [ {
    "url": `${result.airtable.selectQueryResult.rows[i].fields['QRCodeLink']}`,
    "filename": `${result.airtable.selectQueryResult.rows[i].fields['Name']}`,
  } ]
  },
typecast: false
});
}

Thanks a lot for any help

1 Like

I have seen this as well and I was too busy to figure out what I was doing wrong (if at all). I think it’s a bug because I tested many variants and never got it to work in this example.

filename doesn’t save, but url does…
image

Thanks for documenting this.

Yes I hoped I was not alone and it’s true :wink:
This is a huge lack in the API because it means you have to rename all the attachments when beating something automated, even a few.