Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle folders bigger than 2 GB in Get-PnPTeamsChannelFilesFolder #4127

Merged

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
2 participants