Glued – Script Functions – Upload a File to a Flexible Asset

You are here:
  • Main
  • Glued
  • Glued - Script Functions - Upload a File to a Flexible Asset
← All Topics
Table of Contents

You can use a script function to upload a file to a flexible asset where the flexible asset type has a field for Upload.

Create a new script or open an existing one and add a new script step.

  1. Create a new script or open an existing one and add a new script step.
  2. From the function drop down, select Plugin Server Function.
  3. From the Function Guid, select “Glued – Upload File to Flexible Asset”.
  4. Enter the following:
    • asset id – this is the asset id, not the flexible asset type id, and can be retrieved by using the “Get Flexible Asset Information” function if needed.
    • field – this is the field name used in the flexible asset
    • file path – this is the path to the file on the CWA server. Typically you would use the Upload File function to upload a file and reference the file with the %uploadedfile% variable.
  5. Save Step.
  6. When the step is run, it will upload the file from the specified path to the flexible asset. The file name for the upload will match that of the uploaded file. If the asset id or field name is invalid, or if the file path doesn’t exist, the function will log that information for troubleshooting.