Cannot update Multi-Image field via the API

Hi,

I am having a lot of trouble updating a Multi-Image field via the API. Whenever I try to update it I get the old values back. I am updating the CMS items in a batch job, when I get back the “fileId” for each image I record it, then I don’t need to send it down next time if it hasn’t changed.

For example, if I do

GET https://api.webflow.com/collections/5d6f1bc62fd62f2e0a2133c1/items/5ec740f79ad4671fcae81a33
and it returns
..., "gallery": [], ...
Then I do

PUT https://api.webflow.com/collections/5d6f1bc62fd62f2e0a2133c1/items/5ec740f79ad4671fcae81a33

..., "gallery": ["https://syndex--c.ap4.content.force.com/sfc/dist/version/download/?oid=00D900000010Lv4&ids=0686F00000NaN2s&d=%2Fa%2F6F000000YkP8%2FKRSG7nTV4iZhibORwfb2Lrp9xBmPNn9IR5Ou62y6rvA&asPdf=false","https://syndex--c.ap4.content.force.com/sfc/dist/version/download/?oid=00D900000010Lv4&ids=0686F00000NaMLo&d=%2Fa%2F6F000000YkNW%2FzcEpAijrw0PXqnKhs0s.iJATRTAFb8WDOOA0NUH029Q&asPdf=false","https://syndex--c.ap4.content.force.com/sfc/dist/version/download/?oid=00D900000010Lv4&ids=0686F00000Na810&d=%2Fa%2F6F000000Yk9H%2FSCh.6eSuPFv6cVa0VhW1KyVCRCgddFbFlyda30ETUVM&asPdf=false"], ...

Then I get back:
..., gallery: [], ...

It seems to work correctly when I create the records.

What am I doing wrong?

Can you format your post a little better ? It’s hard for me to understand what you mean. Try getting some screenshots please

Thanks

Sorry. Hopefully, that is better. Unfortunately, they marked my post as spam so I couldn’t see it once I posted it.

1 Like

Well… I’m not able to get an image back when I access those urls:

https://syndex--c.ap4.content.force.com/sfc/dist/version/download/?oid=00D900000010Lv4\u0026ids=0686F00000NaN2s\u0026d=%2Fa%2F6F000000YkP8%2FKRSG7nTV4iZhibORwfb2Lrp9xBmPNn9IR5Ou62y6rvA\u0026asPdf=false

It might be something related to access permissions? Long story short, if I can’t see images in that link, webflow probably can’t as well

You’re quite right. It seems the JSON encoding library I was using was encoding the & by default causing the links to not work. I’ve changed the configuration so it doesn’t.

Although, it seems to be working for individual image fields, and making the change doesn’t seem to fix anything.