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

Get-ConfluenceAttachment doesnt work anymore cause PageID is bigger than Int32 #196

Open
ronnooy opened this issue Sep 10, 2021 · 1 comment

Comments

@ronnooy
Copy link

ronnooy commented Sep 10, 2021

Get-ConfluenceAttachment -ApiUri -Credential [-PageID] <Int32[]> [-FileNameFilter ] [-MediaTypeFilter ] [-Skip ] [-First ] [-PageSize ] [-IncludeTotalCount]

ConvertTo-Attachment : Cannot convert value "5206343689" to type "System.UInt32". Error: "Value is too big or too small for a UInt32."
At C:\Program Files\WindowsPowerShell\Modules\ConfluencePS\2.5.1\ConfluencePS.psm1:1083 char:43

  •                             $result | & $converter
    
  •                                       ~~~~~~~~~~~~
    
    • CategoryInfo : MetadataError: (:) [ConvertTo-Attachment], ArgumentTransformationMetadataException
    • FullyQualifiedErrorId : RuntimeException,ConvertTo-Attachment
@dustinbutterworth
Copy link

As a temporary fix, I just replaced all instances of "UInt32" with "UInt64" in ConfluencePS.psm1 and ConfluencePS.Types.cs. Reloaded the module and I was able to get the attachment.

I'm fairly new to Powershell so I am not sure if this is an ideal solution, but it seems to be working for me.

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

No branches or pull requests

2 participants