phpSPO icon indicating copy to clipboard operation
phpSPO copied to clipboard

[OneDrive] Wrong resource path

Open MajorKuprich opened this issue 4 years ago • 0 comments

Hi,

I try to download files from folder but it doesn't work - response: "Invalid request". When I've checked request url it is wrong:

https://graph.microsoft.com/v1.0/me/Drive/items/items/<FILE_ID>/content

Should be:

https://graph.microsoft.com/v1.0/me/Drive/items/<FILE_ID>/content

Duplicated items comes from Office365\Runtime\ResourcePath::toUrl method.

Quickfix - remove additional segments before get file url path.

Sth like this:

$segments = array_unique($segments);

Download files from root folder works fine (request path set correctly).

MajorKuprich avatar Jan 13 '21 11:01 MajorKuprich