Skip to content

ndi.cloud.sync.internal.updateFileInfoForRemoteFiles

  updateFileInfoForRemoteFiles - Update file info of document for remote (cloud-only) files

  Syntax:
    document = ndi.cloud.sync.internal.updateFileInfoForRemoteFiles(document, cloudDatasetId)
    This function updates the file information in the provided document
    object for files that are stored remotely in NDI cloud.

    The following changes are made to the file location structure:
        1. set the 'delete_original' and 'ingest' fields to false.
        2. set the location field using the template "ndic://{dataset_id}/{file_uid}"
        3. set the location_type field to "ndicloud"

  Input Arguments:
    document          - The document object containing file information.
    cloudDatasetId    - The unique identifier for the cloud dataset.

  Output Arguments:
    document          - The updated document object with modified file info.

  See also:
    ndi.cloud.sync.internal.updateFileInfoForLocalFiles