Why are my mp3 files being converted to mpga when downloaded through the api

Here is another discussion I opened on the Gatsby forums Anyone know how to rename a node's file extension? · Discussion #33916 · gatsbyjs/gatsby · GitHub

The gist of it is, I am expecting the api to give me back exactly the file extension I want, yet it seems to compress it or otherwise rename it to an mpga. Is this a quirk of the API, or something specific to what I am using?

Hi @Wahid_Shafique, welcome to the Airtable Community! Thank you for sharing your issue here and providing a link to the gatsby repo discussion. It appears that the plugin gatsby-source-airtable uses the Airtable API to read record data. I was unable to reproduce the issue in which the .mp3 file extension transforms to .mpga directly from the Airtable API. Do you see that transformation occurring within the Airtable API response? Here’s a quick way to test the API response:

  1. go to REST API - Airtable
  2. select the base that you have connected to gatsby-source-airtable
  3. select the table that contains the record with the attachment, and view the docs for Retrieve a record
  4. copy and run the curl command shown on the right sidebar so that you can inspect the url in the response

If needed, you can find a different record id to look up using this guide. If the file extension for the attachment is the expected .mp3 in step 4, I suspect that the transformation happens at some point in gatsby-source-airtable or gatsby and I would recommend filling an issue in those respective GitHub repos.

This topic was solved and automatically closed 15 days after the last reply. New replies are no longer allowed.