Help

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

Topic Labels: API
920 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Wahid_Shafique
4 - Data Explorer
4 - Data Explorer

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?

1 Reply 1
DannyM
Airtable Employee
Airtable Employee

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.