api-reference/v1.0/resources/driveitem.md doesn't document what the possible values of @microsoft.graph.conflictBehavior are.
api-reference/v1.0/api/item_createuploadsession.md mentions rename as one possible value, but doesn't say what happens if rename is not specified, or if there are any other possible values.
I proposed a change https://github.com/microsoftgraph/microsoft-graph-docs/pull/634 based on https://dev.onedrive.com/items/upload_put.htm
@marych can one please help me with @microsoft.graph.conflictBehavior?
It says (https://dev.onedrive.com/items/create.htm):
If @microsoft.graph.conflictBehavior is set to rename and an item with the same name already exists in the destination, the new item name will be updated to be unique. OneDrive will append a number to the end of the item name (for files - before the extension).
For example, My Folder would be renamed My Folder 1. If My Folder 1 is taken, then the number would be incremented again until a unique filename is discovered.
But when I'm trying to send the same request with same file name and with @microsoft.graph.conflictBehavior set to rename it is not creating any new folder instead returning the previously created file with HTTP status code 200.
Please comment on this..!
Pull request #634 was merged.
Most helpful comment
@marych can one please help me with @microsoft.graph.conflictBehavior?
It says (https://dev.onedrive.com/items/create.htm):
If @microsoft.graph.conflictBehavior is set to rename and an item with the same name already exists in the destination, the new item name will be updated to be unique. OneDrive will append a number to the end of the item name (for files - before the extension).
For example, My Folder would be renamed My Folder 1. If My Folder 1 is taken, then the number would be incremented again until a unique filename is discovered.
But when I'm trying to send the same request with same file name and with @microsoft.graph.conflictBehavior set to rename it is not creating any new folder instead returning the previously created file with HTTP status code 200.
Please comment on this..!