• Uploads a file to a specified folder in a SharePoint drive.

    Parameters

    • client: Client

      The Microsoft Graph client instance.

    • options: {
          arrayBuffer: ArrayBuffer;
          driveId: string;
          fileName: string;
          folderId: string;
          siteId: string;
      }

      The options for the upload operation.

      • arrayBuffer: ArrayBuffer

        The content of the file as an ArrayBuffer.

      • driveId: string

        The ID of the drive where the file will be uploaded.

      • fileName: string

        The name of the file to be uploaded.

      • folderId: string

        The ID of the folder where the file will be uploaded.

      • siteId: string

        The ID of the SharePoint site.

    Returns Promise<void>

    A promise that resolves when the upload is complete.

    const client = await getSharePointClient(opt);
    const options = {
    siteId: 'your-site-id',
    driveId: 'your-drive-id',
    folderId: 'your-folder-id',
    fileName: 'your-file-name',
    arrayBuffer: new ArrayBuffer(0),
    };
    await uploadFile(client, options