Open JeroenTriptic opened 1 month ago
Thanks for reporting this @JeroenTriptic.
As a temporary work-around, you can use the withUrl()
method to pass a plain text URL with the query parameter:
$result = $graphServiceClient->drives()->byDriveId('drive-id')->items()->byDriveItemId('driveItem-id')->copy()->withUrl(
$graphServiceClient->getRequestAdapter()->getBaseUrl()."/drives/{$driveId}/items/{$itemId}/copy"
)->post($requestBody)->wait();
Let me know if this works.
Sorry for the late response. The withUrl function does indeed function as a workaround.
Describe the bug
I try to copy a file from folder A to folder B and I try to use
@microsoft.graph.conflictBehavior
but the request does not allow query parameters and it doesn't work if I add it to the body.Expected behavior
I expected
CopyRequestBuilderPostRequestConfiguration
to have query options. Or for theCopyPostRequestBody->setAdditionalData(['@microsoft.graph.conflictBehavior' => 'rename'])
to work.How to reproduce
When there is already a file in the destination folder with the same name it doesn't do anything instead of renaming the new file.
SDK Version
2.10.0
Latest version known to work for scenario above?
1.110.0
Known Workarounds
No response
Debug output
No response
Configuration
No response
Other information
No response