[SOLVED 2/1/24 4:59 AM EDT] Airtable error "Invalid attachment for field xxx: parameters must be objects, not strings”

I creates an “attachment” field in a table where I wanted it to store pictures:

then in the blocks I take a picture and I want to store it in the “atlFotoQui” field:

But when I try to write the record I get this error from Airtable:

{“error”:{“type”:“INVALID_ATTACHMENT_OBJECT”,“message”:“Invalid attachment for field atlFotoQui: parameters must be objects, not strings”}}

Where is my error please?
Grazie

I’m sure there is a quicker way to do it, but that’s my viable solution.

First of all it appears that it’s not very easy to upload an attachment on Airtable (look here, here and here)

The easiest solution would be using an external component, something like Media DB or Cloudinary. I’m pretty sure there is a MEdia DB component still in the snap to place interface that can be used to instantly convert Attachments to URLs to be stored easily.

Also, but i might be wrong, i recall a post on Airtable that was deprecating the use of Attachments for security reasons. But again, i might be wrong so ignore this message.

Hope it helps

1 Like

Yes, this is true. You can read about it here: Airtable Attachment URL Behavior | Airtable Support.

This means that you cannot use Airtable to store images or other attachments that you want to access from outside of Airtable.

Also, I believe your error is happening because you are providing a string (an image’s “Picture” property is the url to where it is hosted) instead of an object (which you would get if you used the green “Photo” block or similar; you can store that object in a variable and then use the variable for your “atlFotoQui” value).

1 Like

Thankyou all for explain me!

I’ll continue to use a simple link (with Cloudinary repository).

Grazie
GM

1 Like