无法创建/重命名带有特殊字符“("的文件(左括号)括号、重命名、特殊字符、文件

2023-09-06 17:34:37 作者:盐甜味女孩

我在通过 Rest 客户端 (PostMan) 在 OneDrive for Business(Admin) 中创建/重命名文件时遇到问题.

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.

网址:https://graph.microsoft.com/v1.0/cloudfuze.co/users/{user_id}/drive/items/{parent_id}/children/{file_name}/content

URL : https://graph.microsoft.com/v1.0/cloudfuze.co/users/{user_id}/drive/items/{parent_id}/children/{file_name}/content

Ex 文件名 : (test).jpg

Ex File Name : (test).jpg

标题:

{
    Authorization:Bearer XXXXXXXXXXXXXXXX,
    Accept:application/json,
    Content-Type:application/json
}

推荐答案

您可以使用以下符号来创建名称中带括号的文件:https://graph.microsoft.com/v1.0/users/{user_id}/drive/items/{parent_id}/children('{file_name}')/content

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

例如:https://graph.microsoft.com/v1.0/me/drive/root/children('text(a).abc')/content