cs-icon.svg

Gestion de la pile de contenu – Actions sur les actifs

Within Contentstack, all uploaded files such as images, videos, PDFs, audio files, and more are stored in your repository for later access. This repository, where uploaded files reside, is referred to as Assets. You can perform asset based operations using the following Contentstack Management Assets actions. All_Assets.png

Let’s look at each of them in detail.

Create an Asset

This action lets you create a new asset in Contentstack.

  1. Under Choose an Action tab, select the Create an Asset action.
  2. Sur la page Create an Asset Configure Action page, enter the details given below:
    1. Click + Add New Account button to connect your Contentstack account as shown in the Connect your Contentstack Account to Automate step.
    2. Select a Stack from the Lookup list and enter a Title for the asset.
    3. Specify a File Name for the asset, such as ‘NewAsset.png’ or ‘NewAsset.jpeg.’
      Select_Fields.png
    4. Saisissez l' Input URL of the image you want to create and specify a suitable Description for the asset.
      Select_Field_2.png
    5. Optionally, enable the Show Optional Fields toggle button to display the Select Folder field.
    6. Dans Select Folder drop-down, choose a destination folder to store your asset.
      Afficher_Champs_facultatifs.png
  3. Once done, click Proceed.
  4. Cliquez sur Tester l'action to test the configured action.
    Test_Action
  5. On successful configuration, you can see the below output. Click Enregistrer et quitter.
    Contentstack_Action_Create_an_asset_Save_Exit.png

Supprimer un actif

This action lets you delete an asset in Contentstack.

  1. Under Choose an Action tab, select the Delete an Asset action.
  2. Sur la page Delete an Asset Configure Action page, entrez les détails ci-dessous:
    1. Click + Add New Account button to connect your Contentstack account as shown in the Connect your Contentstack Account to Automate step.
    2. Select a Stack and Branch from the Lookup list.
    3. Dans Select Asset drop-down, select the asset you want to delete.

      If you have assets stored in nested folders within your Contentstack CMS, you can select such assets as well for deletion.

      Select_Fields.png
  3. Once done, click Proceed.
  4. Cliquez sur Tester l'action to test the configured action.
    Test_Action.png
  5. The output will be shown as follows. Click the Enregistrer et quitter .
    Save_Exit.png

Récupérer tous les actifs

This action lets you fetch details of all the assets in your stack.

  1. Under Choose an Action tab, select the Get All Assets action.
  2. Sur la page Récupérer tous les actifs Configure Action page, enter the details given below:
    1. Click + Add New Account button to connect your Contentstack account as shown in the Connect your Contentstack Account to Automate step.
    2. Sélectionner une pile, Environnementet Bifurquer dans le menu déroulant Lookup list.
      Select_Fields.png

      Note: By default, the main branch is selected (even if the Branch field is empty).

    3. Optionally, enable the Show Optional Fields toggle button to display the Asset Limit, Skip Asset (Pagination) fields.
    4. Dans Select Folder drop-down, select a folder to fetch the details of all the assets present in the folder.

      Additionally, you can mark the Include count, Include publish details and Include metadata checkboxes to display the count of the total number of assets, publish and metadata details in the output.

      Show_Optional.png
  3. Once done, click Proceed.
  4. Cliquez sur Tester l'action to test the configured action.
    Test_Action.png
  5. The output will be shown as follows. Click the Enregistrer et quitter .
    Enregistrer_Et_Exit.png

Get Asset Reference

This action lets you fetch details of all entries in which the selected asset is referenced.

  1. Under Choose an Action tab, select the Get Asset Reference action.
  2. Sur la page Get Asset Reference Configurer une action page, entrez les détails ci-dessous:
    1. Click + Add New Account button to connect your Contentstack account as shown in the Connect your Contentstack Account to Automate step.
    2. Sélectionner une pile, Actifset Bifurquer dans le menu déroulant Lookup list.
      Select_Field.png
  3. Once done, click Proceed.
  4. Cliquez sur Tester l'action to test the configured action.
    Test_Action.png
  5. The output will be shown as follows. Click the Save and Exit button.Save_Exit.png

Récupérer un seul actif

  1. Under Choose an Action tab, select the Get a Single Asset action.
  2. Sur la page Récupérer un seul actif Configure Action page, enter the details given below:
    1. Click + Add New Account button to connect your Contentstack account as shown in the Connect your Contentstack Account to Automate step.
    2. Sélectionner une pile, Bifurquer, Actifset Environnement dans le menu déroulant Lookup list.
      Select_Fields.png

      If you have assets stored in nested folders within your Contentstack CMS, you can also select those assets.

      Remarque : By default, the main branch is selected (even if the Branch field is empty).

      Select_Asset.png
    3. Optionally, enable the Afficher les champs facultatifs toggle button to display the Version field. Here, you can enter the asset Version to fetch the details of the asset.
      Afficher_Champs_facultatifs.png
  3. Once done, click Proceed.
  4. Cliquez sur Tester l'action to test the configured action.
    Test_Action.png
  5. The output will be shown as follows. Click the Enregistrer et quitter .
    Save_Exit.png

Publier un actif

This action lets you publish an asset automatically in your stack. To know more, visit publish assets.

  1. Under Choose an Action tab, select the Publish an Asset action.
  2. Sur la page Publish an Asset Configure Action page, entrez les détails ci-dessous:
    1. Click + Add New Account button to connect your Contentstack account as shown in the Connect your Contentstack Account to Automate step.
    2. Sélectionner une pile, Bifurquer, and an Actifs dans le menu déroulant Lookup list.

      If you have assets stored in nested folders within your Contentstack CMS, you can select such assets as well for publishing.

      Select_Fields.pngYou can fetch the UID for all the previously configured automation steps directly from the Lookup list.

      Note: To dynamically fetch assets, configure the Asset Trigger and fetch the asset UID.

    3. Sélectionnez l'option Environnements) dans le menu déroulant Lookup list where you want to publish the asset.
      Select_Fields.png

      Note: By default, the main branch is selected (even if the Branch field is empty).

    4. [Optional] Enable the Afficher les champs facultatifs toggle button to display the Select Locale(s) et Publish Schedule fields.
      Show_Optional_Field.png

      Note: You can select multiple Environment(s) and Locale(s) to publish the asset.

  3. Once done, click Proceed
  4. Cliquez sur Tester l'action to test the configured action.
    Test_Action.png
  5. On successful configuration, you can see the below output. Click Enregistrer et quitter. A publish and unpublish icon will appear for the asset on the entry page.
    Save_Exit.png

Update an Asset

This action lets you update an existing asset in Contentstack.

  1. Under Choose an Action tab, select the Update an Asset action.
  2. Sur la page Update an Asset Configure Action page, enter the details given below:
    1. Click + Add New Account button to connect your Contentstack account as shown in the Connect your Contentstack Account to Automate step.
    2. Sélectionner une pile and an Actifs dans le menu déroulant Lookup list.

      If you have assets stored in nested folders within your Contentstack CMS, you can select such assets as well for updating their details.

      Select_Fields.png
    3. Enter a Title and a suitable Description for the asset to update.
    4. Specify a File Name for the asset, such as ‘Travel_Friendly.png’ or ‘Travel_Friendly.jpeg.’ Enter the Input URL of the image you want to update.
      Select_Field.png
    5. Optionally, enable the Show Optional Fields toggle button to display the Select Folder field.
    6. Dans Select Folder drop-down, choose a destination folder to update an asset in it.
      Show_Optional_Field.png
  3. Once done, click Proceed.
  4. Cliquez sur Tester l'action to test the configured action.
    Test_Action
  5. On successful configuration, you can see the below output. Click Enregistrer et quitter.
    Contentstack_Action_Update_an_asset_Save_Exit.png
Cet article vous a-t-il été utile ?
^