Open ReviveDigitalTeam opened 7 months ago
It works for me,
example (idea http):
### create session with meta
POST https://graph.microsoft.com/v1.0/me/drive/root:/test-modtime/test-file-session:/createUploadSession
Authorization: {{token}}
Content-Type: application/json
{
"item": {
"@microsoft.graph.conflictBehavior": "replace",
"fileSystemInfo": {
"createdDateTime": "2024-04-24T02:28:27.433Z",
"lastModifiedDateTime": "2024-04-25T02:28:27.433Z"
}
}
}
<> 2024-04-26T140903.200.json
### upload
PUT https://api.onedrive.com/rup/6349fe61df03d513/eyJSZX
Content-Length: 96
Content-Range: bytes 0-95/96
< main.go
<> 2024-04-26T141705.201.json
#{
# ...
# "createdDateTime": "2024-04-26T06:17:04.35Z",
# "lastModifiedDateTime": "2024-04-26T06:17:04.35Z",
# "name": "test-file-session",
# "size": 96,
# "fileSystemInfo": {
# "createdDateTime": "2024-04-24T02:28:27.433Z",
# "lastModifiedDateTime": "2024-04-25T02:28:27.433Z"
# },
# "lenses": []
#}
The documented properties for
createUploadSession
include:fileSystemInfo
Per: https://learn.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_createuploadsession?view=odsp-graph-online#propertiesI would like to supply a lastModifiedDateTime.
If the fileSystemInfo object is supplied at all, with any properties, the request fails. These are the available properties of fileSystemInfo:
Example successful request:
Example failing request:
ID's from Graph Explorer: "client-request-id": "2b69e814-af57-232a-8793-32234145768a", "request-id": "9b3f0a6d-0970-4fa1-9991-e184d3724785"
Please could you fix graphAPI so that it matches the documentation (not the other way around)?