I have an issue while creating / renaming files in OneDrive for Business(Admin) through rest client(PostMan).
Can you guys point me where i can find the tutorial or any documentation that states any specific requirements / restrictions for creating / renaming a file.
Please find the below details of the request.
URL : https://graph.microsoft.com/v1.0/cloudfuze.co/users/{user_id}/drive/items/{parent_id}/children/{file_name}/content
Ex File Name : (test).jpg
Headers :
{
Authorization:Bearer XXXXXXXXXXXXXXXX,
Accept:application/json,
Content-Type:application/json
}
You can use the following notation to create files with parenthesis in name: https://graph.microsoft.com/v1.0/users/{user_id}/drive/items/{parent_id}/children('{file_name}')/content
For example: https://graph.microsoft.com/v1.0/me/drive/root/children('text(a).abc')/content
Seems its some kind of bug. The only workaround I found is to upload a file with random name, then rename it using PATCH. Here's the article about restricted characters in filename: https://support.microsoft.com/en-us/kb/3125202
来源:https://stackoverflow.com/questions/41612670/unable-to-create-rename-files-with-special-character-open-parenthesis