benjamincrozat/laravel-dropbox-driver
Laravel Flysystem driver that lets you use Dropbox as a storage disk in Laravel. Configure via filesystem settings and use the standard Storage API to upload, download, list, and manage files on Dropbox like any other disk.
Illuminate\Filesystem contract, ensuring seamless integration with existing Storage facade usage. The package continues to abstract Dropbox’s API into a filesystem interface, maintaining low cognitive load for developers.Storage::disk('dropbox')->url('file.pdf', ['shared' => true]);
config/filesystems.php and .env. No core Laravel files are modified.fallback disk configuration:
'dropbox' => [
'driver' => 'dropbox',
'fallback' => 'local',
],
file.creating) remain usable for custom logic (e.g., logging, notifications).FilesystemAdapter interface updates).dropbox/dropbox-sdk v3+)./files/download vs. /files/download_rev).try {
Storage::disk('dropbox')->put('file', $content);
} catch (\Dropbox\Exception\ApiException $e) {
Log::error("Dropbox API error: " . $e->getMessage());
// Fallback logic
}
FilesystemAdapter interface)?/files/list_folder vs. deprecated /files/list_folder/continue)?local disk)?Storage facade, Flysystem). Non-Laravel PHP apps require refactoring.dropbox/dropbox-sdk (v2+). Action Required:
composer.json to avoid conflicts:
"dropbox/dropbox-sdk": "^3.0"
laravel-medialibrary for asset management.dropbox disk in config/filesystems.php with a test token:
'dropbox' => [
'driver' => 'dropbox',
'access_token' => env('DROPBOX_ACCESS_TOKEN'),
'fallback' => 'local',
],
Storage::disk('local') with Storage::disk('dropbox') for non-critical files (e.g., logs, backups).put, get, delete, url) and Dropbox-specific features (e.g., shared links).storage_path('app') with Storage::disk('dropbox')->path('app')).cache or a dedicated service).laravel/framework version constraint in composer.json:
"laravel/framework": "^11.0"
config/filesystems.php and .env, reducing drift.dropbox/dropbox-sdk version to avoid compatibility issues.composer.json override or post-update script to validate SDK compatibility.How can I help you explore Laravel packages today?