I am searching for a way, how can I list files in a specific folder (with folder id) in Google Drive API v3. I used this function $service->files->listFiles()
but It return all files in google Drive. Do you know which function can I use?
Goto the same Google Sheets File and refresh the page. Then you will get the "List Files/Folders" menu, click on it, and select the "List All Files and Folders" item.
To switch from grid view to list view, open Google Drive and press the List view button. Note: Smartbar features are available in the Google Drive file preview for Google files and non-Google files. You can access the file preview directly from grid mode.
To create a file in a folder, use the files. create method and specify the folder ID in the parents property of the file. The following code snippet shows how to create a file in a specific folder using a client library: Note: If you're using the older Drive API v2, use the files.
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);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With