Forum Discussion

andrewc105's avatar
andrewc105
Copper Contributor
Oct 14, 2024
Solved

Url encoded folder names not decoded on server end

When using the OneDrive API I am url encoding the file names so for example a file with a plus or hash symbol would get encoded the the percent symbol escape sequence.  This works correctly for files and they are created on OneDrive with the correct characters.

When I create a folder this does not work correctly.  I encode the name in the same way but when the folder is created on OneDrive it still contains the percent symbol so it seems not to be decoding server side.

 

Does anyone know how to fix this?

 

Thanks

  • Well I found the workaround for this. If the folder you want to create would have percent symbols in after url encoding then don't' create the folder. Instead create a dummy file inside that folder path and then delete it. The folder will be auto created anyway. It does work correctly with url encoding with the file creation. So that solves the problem.

2 Replies

  • andrewc105's avatar
    andrewc105
    Copper Contributor
    Well I found the workaround for this. If the folder you want to create would have percent symbols in after url encoding then don't' create the folder. Instead create a dummy file inside that folder path and then delete it. The folder will be auto created anyway. It does work correctly with url encoding with the file creation. So that solves the problem.

Resources