@inrupt/solid-client
    Preparing search index...

    Function saveSolidDatasetInContainer

    • Given a SolidDataset, store it in a Solid Pod in a new Resource inside a Container.

      The Container at the given URL should already exist; if it does not, you can initialise it first using [[createContainerAt]], or directly save the SolidDataset at the desired location using [[saveSolidDatasetAt]].

      This function is primarily useful if the current user does not have access to change existing files in a Container, but is allowed to add new files; in other words, they have Append, but not Write access to a Container. This is useful in situations where someone wants to allow others to, for example, send notifications to their Pod, but not to view or delete existing notifications. You can pass a suggestion for the new Resource's name, but the server may decide to give it another name — for example, if a Resource with that name already exists inside the given Container. If the user does have access to write directly to a given location, [[saveSolidDatasetAt]] will do the job just fine, and does not require the parent Container to exist in advance.

      Parameters

      • containerUrl: string | Url

        URL of the Container in which to create a new Resource.

      • solidDataset: SolidDataset

        The [[SolidDataset]] to save to a new Resource in the given Container.

      • Optionaloptions: SaveInContainerOptions

        Optional parameter options.fetch: An alternative fetch function to make the HTTP request, compatible with the browser-native fetch API.

      Returns Promise<Readonly<{}> & WithResourceInfo>

      A Promise resolving to a [[SolidDataset]] containing the saved data. The Promise rejects if the save failed.