biigle / flysystem-aruna
Flysystem adapter for the Aruna Object Storage.
Installs: 1 196
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- guzzlehttp/guzzle: ^6.0|^7.3
- league/flysystem: ^3.0
- league/flysystem-aws-s3-v3: ^3.0
- league/mime-type-detection: ^1.0
Requires (Dev)
- league/flysystem-adapter-test-utilities: ^3.15
- mockery/mockery: ^1.4
- phpunit/phpunit: ^9.5
- symfony/var-dumper: ^6.0
README
⚠️ This package is archived because AOS can now be used via the S3 protocol only.
Flysystem adapter for the Aruna Object Storage.
This adapter performs most of the operations via S3. Only listContents
requires an HTTP client and collection ID. Once the ListObjectV2 S3 operation is implemented in Aruna, this adapter can be deprecated and the S3 adapter can be used directly.
Installation
composer require biigle/flysystem-aruna
Usage
use Aws\S3\S3Client; use Biigle\Flysystem\Aruna\ArunaAdapter; use GuzzleHttp\Client; # Scheme: <latest or semver>.<collection name>.<project name> $bucket = 'latest.collection-name.project-name'; $collectionId = 'MYARUNACOLLECTIONULID'; $s3Client = new S3Client([ 'credentials' => [ 'key' => 'mykey', 'secret' => 'mysecret', ], 'endpoint' => "https://{$bucket}.data.gi.aruna-storage.org", // Keep as-is. 'region' => '', 'version' => 'latest', 'bucket_endpoint' => true, ]); $httpClient = new Client([ 'base_uri' => 'https://api.aruna-storage.org', 'headers' => [ 'Authorization' => 'Bearer my-aruna-token-secret', ], ]); $adapter = new ArunaAdapter($s3Client, $bucket, $httpClient, $collectionId); $exists = $adapter->fileExists('path/to/file.jpg'); var_dump($exists); // bool(true);
Funding
This work was supported by the German Research Foundation (DFG) within the project “Establishment of the National Research Data Infrastructure (NFDI)” in the consortium NFDI4Biodiversity (project number 442032008).