league / flysystem-gridfs
Flysystem adapter for MongoDB GridFS
Installs: 296 590
Dependents: 19
Suggesters: 8
Security: 0
Stars: 18
Watchers: 5
Forks: 12
Open Issues: 2
Requires
- php: >=5.4.0
- league/flysystem: ~1.0
Requires (Dev)
- mockery/mockery: ~0.9
- phpunit/phpunit: ~4.0
This package is auto-updated.
Last update: 2023-11-06 06:46:10 UTC
README
This is a Flysystem adapter for the MongoDB's GridFS.
Installation
composer require league/flysystem-gridfs
Bootstrap
<?php use League\Flysystem\GridFS\GridFSAdapter; use League\Flysystem\Filesystem; include __DIR__ . '/vendor/autoload.php'; $mongoClient = new MongoClient(); $gridFs = $mongoClient->selectDB('db_name')->getGridFS(); $adapter = new GridFSAdapter($gridFs);