Conflict Behavior cannot be set for Drive Item Copy
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 38/100
Hướng nghiên cứu
Bắt đầu với các lớp CopyRequestBuilderPostRequestConfiguration và CopyPostRequestBody được tạo tự động, sử dụng request tái hiện trong issue. So sánh hành vi của copy request trong các phiên bản SDK 2.10.0 và 1.110.0, sau đó xác minh rằng conflictBehavior=rename được chấp nhận và đổi tên tệp đích đang xung đột.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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 the CopyPostRequestBody->setAdditionalData(['@microsoft.graph.conflictBehavior' => 'rename']) to work.
How to reproduce
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Drives\Item\Items\Item\Copy\CopyPostRequestBody;
use Microsoft\Graph\Generated\Models\ItemReference;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new CopyPostRequestBody();
$parentReference = new ItemReference();
$parentReference->setDriveId('6F7D00BF-FC4D-4E62-9769-6AEA81F3A21B');
$parentReference->setId('DCD0D3AD-8989-4F23-A5A2-2C086050513F');
$requestBody->setParentReference($parentReference);
$requestBody->setAdditionalData(['@microsoft.graph.conflictBehavior' => 'rename']);
$result = $graphServiceClient->drives()->byDriveId('drive-id')->items()->byDriveItemId('driveItem-id')->copy()->post($requestBody)->wait();
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
- Ngôn ngữ chính
- PHP
- Star
- 669
- Fork
- 150
- Merge trung bình
- 15 giờ 21 phút
- Pull request đã merge (30 ngày)
- 3
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoftgraph/msgraph-sdk-php
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
microsoftgraph/msgraph-sdk-php#1794 · 2 bình luận ·
-
bug: metadata type:bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
microsoftgraph/msgraph-sdk-php#1739 · 6 bình luận ·
-
status:waiting-for-triage type:bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
microsoftgraph/msgraph-sdk-php#1643 · 8 bình luận · 4 reaction ·
-
status:waiting-for-triage
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
microsoftgraph/msgraph-sdk-php#1800 · 1 reaction ·
-
Now Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 1/100
microsoftgraph/msgraph-sdk-php#1799 ·
Tất cả issue của microsoftgraph/msgraph-sdk-php
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
getgrav/grav-plugin-api#45 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
RSS-Bridge/rss-bridge#5098 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
phingofficial/phing#2025 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
silverstripe/developer-docs#911 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100