Skip to content

Conversation

reshmee011
Copy link
Contributor

Type

  • Bug Fix

Related Issues?

Fixes #5010

What is in this Pull Request ?

A switch parameter NoUrlDecode to skip URL decoding of file name to cater for %20 within filename.

@KoenZomers
Copy link
Collaborator

Thanks for trying to fix this @reshmee011. but did you actually test your suggested code and did it work? If I'm trying here, it doesn't work. This is because PnP Core, which is responsible for retrieving the actual file contents behind the scenes, messes with the URL and replaces the %20 with a space:

https://github.com/pnp/pnpcore/blob/58c2307eed1946a2b8999217ea641fcd5e0f1ce2/src/sdk/PnP.Core/Model/SharePoint/Core/Internal/Web.cs#L591

I don't see an easy way to fix this without making things really messy in the code.

@reshmee011
Copy link
Contributor Author

I thought I got it working it before submitting the PR, it's not working anymore for me too. I was not convinced with the fix was the best forward.

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] Get-PnPFile incorrectly interprets %20 as a space in the file name
2 participants