Quick Start Guide
Start loading Google Drive images, videos, audio, and documents in under 2 minutes.
Overview
DriveLoader handles URL parsing, candidate probes, CORS retries, and multi-tier caching automatically.
Code Example
quick-start.tsx
| 1 | import { DriveMedia } from '@driveloader/react'; |
| 2 | import '@driveloader/react/styles.css'; |
| 3 | |
| 4 | export function App() { |
| 5 | return ( |
| 6 | <div className="space-y-4"> |
| 7 | {/* Universal component automatically detects asset type */} |
| 8 | <DriveMedia src="https://drive.google.com/file/d/FILE_ID/view" /> |
| 9 | </div> |
| 10 | ); |
| 11 | } |
Best Practices
- •Extract File IDs instead of passing full URLs to save bandwidth, though both work perfectly.
