Matterway
    Preparing search index...

    Function uploadFileEval

    • Upload a file to a SharePoint drive using Microsoft Graph API.

      Parameters

      • ctx: Context
      • token: string

        Access token from getSharePointTokenUserAuth

      • options: { driveId: string; filePath: string; arrayBuffer: ArrayBuffer }
        • driveId: string

          Drive ID (e.g. , 'ab!5xqiQKeGnEGeI02fc4Mu5HrH_BkaM1FNnCohEqq7eEnQYz1prATORbPSv-3951Ny')

        • filePath: string

          File path (e.g. , '/path/to/file.txt')

        • arrayBuffer: ArrayBuffer

          File content as ArrayBuffer

      Returns Promise<any>

      Return upload response

      const uploadResponse = await uploadFileEval(ctx, token, {
      driveId: 'ab!5xqiQKeGnEGeI02fc4Mu5HrH_BkaM1FNnCohEqq7eEnQYz1prATORbPSv-3951Ny',
      filePath: '/path/to/file.txt',
      arrayBuffer: fileArrayBuffer,
      });