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

    Function getOrCreateResourceAsObservable

    • getOrCreateResourceAsObservable retrieves an existing content resource by its key, or creates a new one if the key is not provided. If a resource key is provided, it attempts to fetch the existing resource from the server. If no key is provided, it creates a new resource with the specified properties.

      Parameters

      • resourceKey: null | string

        Optional key of the existing resource to retrieve

      • fileToUpload: null | File | Blob

        Optional 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 a ContentResource