Airtable API fetch

Hi ,
I have used fetch method fetch external data to airtable Via customer script app . But while while we used to download PDF from API url and the External Api response as

HEADERS

  • Content-Type:application/octet-stream
  • Content-Disposition:attachment; filename="{filename}"

BODY
File content

My Question is how can get this fies and store in airtable some attachment fields .

Please advice .,

In order to upload an attachment to Airtable with scripting, you must provide Airtable with a publicly accessible url for the fileā€”not the file itself. See the documentation for more info.

If the service only gives you the file data (and not a publicly accessible url) you will need to upload the blob to another third party service that will publicly host the file, and then upload it to Airtable from the url from the third party service.