You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying up upload a file using the SDK, resulting in: $graphClient->drives()->byDriveId($driveId)->items()->byDriveItemId($itemId.':/'.$filename.':')->content()->put(Utils::streamFor($fileContent))->wait();
As you can see I have to abuse the byDriveItemId DriveId, because the underlying code calls for the url template: {+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/content{?%24format*} Which does not allow for the use of the filename, as described in https://learn.microsoft.com/en-us/graph/api/driveitem-put-content?view=graph-rest-1.0&tabs=http where it should use the url PUT /drives/{drive-id}/items/{parent-id}:/{filename}:/content
Expected behavior
I expect the SDK to support an option somewhere to supply the filename in a correct way, instead of having to string combine it.
How to reproduce
Uploading a file trough the supplied SDK methods as described above
SDK Version
2.12.0
Latest version known to work for scenario above?
No response
Known Workarounds
No response
Debug output
No response
Configuration
No response
Other information
No response
The text was updated successfully, but these errors were encountered:
Hi @RikvanderLinde, thank you for your feedback and glad that you found a workaround. To try and reduce the size of the generated library, we are generating a slightly limited set of canonical paths and will look into considering this.
Describe the bug
I am trying up upload a file using the SDK, resulting in:
$graphClient->drives()->byDriveId($driveId)->items()->byDriveItemId($itemId.':/'.$filename.':')->content()->put(Utils::streamFor($fileContent))->wait();
As you can see I have to abuse the byDriveItemId DriveId, because the underlying code calls for the url template:
{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/content{?%24format*}
Which does not allow for the use of the filename, as described in https://learn.microsoft.com/en-us/graph/api/driveitem-put-content?view=graph-rest-1.0&tabs=http where it should use the urlPUT /drives/{drive-id}/items/{parent-id}:/{filename}:/content
Expected behavior
I expect the SDK to support an option somewhere to supply the filename in a correct way, instead of having to string combine it.
How to reproduce
Uploading a file trough the supplied SDK methods as described above
SDK Version
2.12.0
Latest version known to work for scenario above?
No response
Known Workarounds
No response
Debug output
No response
Configuration
No response
Other information
No response
The text was updated successfully, but these errors were encountered: