What custom field must be set inside the collection settings in Webflow for the ExtFileRef type to work when using the CMS API to add photos to a collection?
To use the ExtFileRef type and add photos to a collection using the CMS API in Webflow, you need to set the "API ID" field inside the collection settings.
Here is how you can do it:
- Log in to your Webflow account and navigate to the Collections tab.
- Select the collection you want to add photos to.
- Click on the Collection Settings button located at the top right corner of the page.
- In the Collection Settings panel, you will find a field titled "API ID."
- Enter a unique identifier for the field in the API ID field. It is recommended to use lowercase letters and underscores instead of spaces or special characters.
- Save your changes.
Once you have set the API ID field, you can use the ExtFileRef type in your CMS API calls to add photos to your collection items. The ExtFileRef type allows you to reference external images by their URL, making it convenient to add photos programmatically through the CMS API.
Remember to make sure that the field you create with the ExtFileRef type is also set as a multi-reference field, so that you can assign multiple images to each collection item.
By setting the "API ID" field inside the collection settings, you enable the use of the ExtFileRef type for adding photos to a collection using the CMS API in Webflow.