How to register in a specific folder in Google Drive API v3 PHP

Hi, I'm looking for a way how I can list files in a specific folder (with folder ID) in Google Drive API v3. I used this function $service->files->listFiles(), but returned all the files to Google Drive. Do you know which function I can use?

+4
source share
1 answer

cool I found the answer.

  $optParams = array(
        'pageSize' => 10,
        'fields' => "nextPageToken, files(contentHints/thumbnail,fileExtension,iconLink,id,name,size,thumbnailLink,webContentLink,webViewLink,mimeType,parents)",
        'q' => "'".$folderId."' in parents"
        );
      $results = $service->files->listFiles($optParams);
+8
source

Source: https://habr.com/ru/post/1668877/


All Articles