Attachments get reversed order when uploaded through API

Topic Labels: API
3117 3
Showing results for 
Search instead for 
Did you mean: 
6 - Interface Innovator
6 - Interface Innovator


I’m using airtable.js to migrate a lot of data from Filemaker to Airtable at the moment.

Each record contains a Picture (attachment) field with images. In airtable.js I’m creating an array which contains all correct image urls and filenames per record, which is then being pushed/updated to the relevant record in Airtable.

"Picture": [ { "filename": "1.jpg", "url": "" }, { "filename": "2.jpg", "url": "" }, { "filename": "3.jpg", "url": "" }, { "filename": "4.jpg", "url": "" }, { "filename": "5.jpg", "url": "" }, ]

Logically, I want the position of my images to stay as stated in the array that I’m pushing, but the result I’m getting in the final Airtable is that picture 5.jpg is first and 1.jpg is last …

This seems like a bug to me … Or am I doing something wrong? Is there a way to maintain the positioning of the images?

3 Replies 3

Hi Tom,

This behavior, while strange, is the expected behavior for this version of the API, so you’ll need to reverse your array to get the order to match the order in the UI.

We will be fixing this in the next version of the API (we can’t change it in this version because it would break people’s existing integrations)

Sorry for the confusion!

Hi Kasra,

Thanks for the reply! I indeed proceeded with a reversed array, which then works like a charm :slightly_smiling_face:

Nice to hear it will be fixed, though!

4 - Data Explorer
4 - Data Explorer

Thanks! I was wondering how to upload image attachments using URLs…