@halix/action-sdk
    Preparing search index...

    Function createOrUpdateResourceAsObservable

    • createOrUpdateResourceAsObservable creates a new content resource or updates an existing one, then uploads the file contents to that resource. If a resourceKey is provided, it updates the existing resource; otherwise, it creates a new resource and uploads the file to the newly created resource.

      Parameters

      • resourceKey: null | string

        Optional key of the existing resource to update; if not provided, a new resource is created

      • fileToUpload: File | Blob

        The file or blob to upload

      • publicFlag: boolean

        Whether the resource should be public

      • resourceType: string

        The type of resource

      • tags: string[]

        Array of tags for the resource

      Returns Observable<ContentResource>

      Observable resolving to the ContentResource with uploaded file