Skip to content

Conversation

jackpoz
Copy link
Contributor

@jackpoz jackpoz commented Jul 30, 2024

Type

  • Bug Fix
  • New Feature
  • Sample

Related Issues?

Fixes #4126

What is in this Pull Request ?

Handle folders bigger than 2 GB in Get-PnPTeamsChannelFilesFolder.

The Graph documentation of driveItem type returned by /teams/{id}/channels/{id}/filesFolder specifies Int64 as type of size property. Using long to follow the PnP PowerShell current standard.

Tests

Before the PR Get-PnPTeamsChannelFilesFolder shows nothing as the exception is swallowed if the channel has more than 2147483647 bytes (or around 2 GB):
image
Debugging shows the exception message "The JSON value could not be converted to System.Int32. Path: $.size":
image

With the PR the cmdlet shows the response:
image

@gautamdsheth gautamdsheth merged commit a0a8099 into pnp:dev Aug 9, 2024
2 checks passed
@gautamdsheth
Copy link
Collaborator

Thanks @jackpoz , good catch , have merged it !

@jackpoz jackpoz deleted the fixes/GetPnPTeamsChannelFilesFolderSize branch August 10, 2024 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] In the Get-PnPTeamsChannelFilesFolder (and maybe elsewhere) Format Exception in JSON, size type is wrong in model
2 participants