[IMPLEMENTED] Run a script when Asset is changed

Is there a way to run a script when an asset is changed? For instance, to prevent the user to change certain assets, like those in a folder or starting with some prefix?

Also, is there an History feature planned for assets? As with content, it would be great to able to undo a change.

[X ] Cloud version

Not yet. The history is also planned, but you actually get old content manually by using the api and specifying the version parameter.

But the API only allows access to content, not assets (as I see in the Content API link).

I mean asset content. As described here, Squidex provides several endpoints.

The asset endpoint has an optional version parameter: https://cloud.squidex.io/api/docs#operation/AssetContent_GetAssetContent

If your asset has file version 2, you can get 0, 1, 2 from this endpoint.

Thanks Sebastian. I did not explore that area fo Squidex yet :slight_smile:
But for the moment we will use the backups as a fail-safe.

The problem arised, because one of our contributors dragged a new image to create a new asset, but dropped it in the middle of the screen, updating another asset. As there is no way to undo that operation, we got worried. I would suggest to not update instantly but to show a confirmation dialog “Do you want to update the asset?”.

1 Like

Good point, can you create another feature request for that?

This feature has been implemented and deployed.

This topic was automatically closed after 2 days. New replies are no longer allowed.