Jan 30, 202307:56 AM - edited Jan 30, 202307:57 AM
I am currently looking to download a file from an attachment field within an Airtable Script to send it in an API Call to a REST Api, however I am having issues with downloading the attachment in the script.
I have tried downloading the file via a fetch to the download url, however all I am getting back is the download link back.
This is actually correct! You're not really aiming to "downloading" the file per se. Instead, you're pointing to the location where the file is currently stored. That's why the the script is correctly returning the URL.
I don't have any context for the API that you're trying to send the attachment to, but you should be able to cleanly pass the API the URL to the attachment in Airtable. The API will then be able to download and store the resource (attachment) that is represented in the URL.