Paging broken on Drive?

I have a folder with 18 files. If I make a list with maxResults = 20, I get all 18. So far, so good.

If I set maxResults = 10, I get 10 and ...

 "nextPageToken": "!!|~EAIaggELEgA6egpi96NuFMj_____f_8AAP__AAD_KFSjepDGzcnNxs3GzMnPy8jRyNGqpsyrlMusoLmnlP8AAP__AP7__n__AP8AKFSjepDGzcnNxs3GzMnPy8jRyNGqpsyrlMusoLmnlP8A__4QESF03OHBi8LW0zkAAAAAN-uRXEgBDEAAIgsJb4Vcq9cAAAAgBg"

... so far so good.

If I then request 10 more using pageToken

https://www.googleapis.com/drive/v2/files?pageToken=!!%7C~EAIaggELEgA6egpi96NuFMj_____f_8AAP__AAD_KFSjepDGzcnNxs3GzMnPy8jRyNGqpsyrlMusoLmnlP8AAP__AP7__n__AP8AKFSjepDGzcnNxs3GzMnPy8jRyNGqpsyrlMusoLmnlP8A__4QESF03OHBi8LW0zkAAAAAN-uRXEgBDEAAIgsJb4Vcq9cAAAAgBg&maxResults=10&q='0Bw3h_yCVtXbbQ1BzcU5TbXl1T1k'+in+parents+and+trashed%3Dfalse&fields=nextLink%2CnextPageToken%2Citems(description%2Cid%2Ctitle)%2CnextPageToken

... I get 1 element, not nextPageToken, not the expected 8.

If I do the same from the API, I get 10 and 8 as expected. The difference is that the Explorer API gives a much shorter nextPageToken. I also noticed that the Explorer API gives a status of 200 for both GETs. My application is sometimes given 304 but not consistent. I suspect the significant difference is that my application has a drive.file scope. This should not be a problem, remember that if I ask for 20, I get all 18 files.

Some more tests if I installed ...

  • maxResults = 4, 15 .
  • maxResults = 6 7 18 (woot!!).
  • maxResults = 11 14
  • maxResults = 12 14
  • maxResults = 16 ( ...) 24!. 24, 18 . , 6 .

!

0

All Articles