1. Upload

Update the configuration settings

Note

To configure Content Hub, you must either be a superuser or have the necessary permissions granted to you through user group policies.

The upload configuration settings give you the ability to determine how an upload is done and what it affects.

Change the upload URL lifetime

To change the upload URL lifetime:

  1. On the menu bar, click Manage and, on the Manage page, click Entities.

  2. On the Entities page, in the left pane, search for and click M.UploadConfiguration.

  3. In the right pane, next to AssetUploadConfiguration, click Details.

  4. On the Entity details page, on the System tab, click Edit .

  5. In the ConfigurationSettings field, from the drop-down list, click Text.

  6. Add or edit the upload_url_lifetime_in_minutes parameter. This sets the lifetime of the upload URL in minutes. Its value is an integer between 1 and 1440. The default is 10.

Define the upload configuration

To define the upload configuration:

  1. On the menu bar, click Manage and, on the Manage page, click Entities.

  2. On the Entities page, in the left pane, search for and click M.UploadConfiguration.

  3. In the right pane, next to AssetUploadConfiguration, click Details.

  4. On the Entity details page, on the System tab, click Edit .

  5. In the ConfigurationSettings field, from the drop-down list, click Text.

  6. Modify upload configuration settings as required.

Modify entity relations in the upload configuration

An asset upload can directly link the asset to another entity upon creation. This is useful, for example, when uploading an asset for a product. To do this, modify the ConfigurationSettings.entityConfiguration.relations object in M.UploadConfiguration (for example, AssetUploadConfiguration):

"relations": {
  "PCMProductToAsset": {
    "relation": "PCMProductToAsset",
    "role": "Child"
  }
}

This example sets a default value for the relation that a user cannot overwrite using the API:

"relations": {
  "PCMProductToAsset": {
    "relation": "PCMProductToAsset",
    "role": "Child",
    "ids": [
      "35487"
    ]
  }
}

This example customizes the relation name:

"relations": {
  "products": {
    "relation": "PCMProductToAsset",
    "role": "Child"
  }
}

In this example, the payload uses a customized name:

{
   "file_name":"create another option in toolkit.mp4",
   "file_size":"32596513",
   "upload_configuration":{
      "name":"AssetUploadConfiguration",
      "parameters": { "products" : 36062}
      
   },
   "action":{
      "name":"NewAsset"
   }
}

To modify entity relations in the upload configuration:

  1. On the menu bar, click Manage and, on the Manage page, click Entities.

  2. On the Entities page, in the left pane, search for and click M.UploadConfiguration.

  3. In the right pane, next to AssetUploadConfiguration, click Details.

  4. On the Entity details page, on the System tab, click Edit .

  5. In the ConfigurationSettings field, from the drop-down list, click Text.

  6. Modify relations as required.

If you have suggestions for improving this article, let us know!