I have a use case where an assets filed will be part of a content schema. The assets file should only have one asset per schema, since the schema will describe the asset. But users should be allowed to add as many assets as they like at one time. We could not use Asset Metadata for this as the search ability won’t suffice.
The idea is to trigger a script on Create for this schema type that will:
- remove all but one asset/file
- for each additional asset/file, create another set of content will all of the other field values and one of the assets
- Save the original content with only one asset
- On update, we would just reject() if a user attempts to add another document (for now)
Question: is there a way to create new content by calling a Squidex API or helper function to create new Content?