Skip to main content
Solved

Download attachments via API keeping the original file name

  • November 2, 2021
  • 2 replies
  • 230 views

Forum|alt.badge.img+3

Hi,

I would like to download attachments via API or download link keeping the original file name. I managed so far to download all attachments using the URL airtable generates for each attachment using a HTTP get request to the link. The issue is that when downloading through the URL it gives new generic names for all files such as:
file (1)
file (2)

file(103)
Etc.

Do any of you know a solution to this? I am currently setting this up in Integromat.

Thanks!

Best answer by ScottWorld

The URL contains the name of the attachment at the end with “illegal characters” removed, and when you manually download the attachment from the URL, it will preserve this name as your filename.

But the Airtable API always returns the original filename for an attachment (with no substitutions at all) as the value for the “filename” property.

If you’re getting generic filenames in Integromat, then you haven’t specified the filename that you want to use for the specific module that you’ve chosen. There are no “download” modules for Airtable, so you must be using another web service to grab the file.

2 replies

ScottWorld
Forum|alt.badge.img+35
  • Genius
  • 9808 replies
  • Answer
  • November 2, 2021

The URL contains the name of the attachment at the end with “illegal characters” removed, and when you manually download the attachment from the URL, it will preserve this name as your filename.

But the Airtable API always returns the original filename for an attachment (with no substitutions at all) as the value for the “filename” property.

If you’re getting generic filenames in Integromat, then you haven’t specified the filename that you want to use for the specific module that you’ve chosen. There are no “download” modules for Airtable, so you must be using another web service to grab the file.


Forum|alt.badge.img+3
  • Author
  • New Participant
  • 1 reply
  • November 2, 2021

Thanks so much for the explanation Scott!