Public Google Drive Folder Support
Fetch and paginate public folder contents using the official Google Drive API v3.
folder-support.tsx
| 1 | import { useDriveFolder } from '@driveloader/react'; |
| 2 | |
| 3 | const { assets, loading, loadMore, hasMore } = useDriveFolder({ |
| 4 | folderUrl: 'https://drive.google.com/drive/folders/FOLDER_ID', |
| 5 | apiKey: 'YOUR_GOOGLE_DRIVE_API_KEY', |
| 6 | mediaTypes: ['image', 'video'], |
| 7 | pageSize: 20, |
| 8 | }); |
Usage Notes
Requires a public Google Drive API Key from Google Cloud Console.
