This package contains a Flysystem v3 adapter for Sciebo, a non-commercial file hosting service based on ownCloud provided by the universities of the state of North Rhine-Westphalia (Germany). The API is based on the WebDAV protocol.
You can install the package via composer:
composer require joschaefer/flysystem-sciebo
First obtain credentials for accessing your Sciebo storage:
- Log in to Sciebo
- Click on your username in the top-right corner and go to Settings
- Go to Security tab
- Enter a name for your application and hit Create new app passcode
- Store the created credentials for later
<?php
use Joschaefer\Flysystem\Sciebo\ScieboAdapter;
use Joschaefer\Flysystem\Sciebo\ScieboClient;
use League\Flysystem\Filesystem;
include __DIR__ . '/vendor/autoload.php';
$client = new ScieboClient('rwth-aachen', 'ABC123@rwth-aachen.de', 'your-secret-app-passcode');
$adapter = new ScieboAdapter($client);
$filesystem = new Filesystem($adapter);
If you are using this adapter in a Laravel project, add the following to app/Providers/AppServiceProvider.php:
<?php
namespace App\Providers;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\ServiceProvider;
use Joschaefer\Flysystem\Sciebo\ScieboAdapter;
use Joschaefer\Flysystem\Sciebo\ScieboClient;
use League\Flysystem\Filesystem;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
}
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
// ...
Storage::extend('sciebo', function ($app, $config) {
$adapter = new ScieboAdapter(
new ScieboClient($config['node'], $config['username'], $config['password']),
$config['prefix']
);
return new FilesystemAdapter(
new Filesystem($adapter, $config),
$adapter,
$config
);
});
}
}
After that you need to extend the configurations in config/filesystems.php like this:
<?php
return [
// ...
'disks' => [
// ...
'sciebo' => [
'driver' => 'sciebo',
'node' => env('SCIEBO_NODE', ''),
'username' => env('SCIEBO_USERNAME', ''),
'password' => env('SCIEBO_PASSWORD', ''),
'prefix' => env('SCIEBO_PREFIX'),
],
],
// ...
];
And finally add your config to your .env file:
SCIEBO_NODE=rwth-aachen
SCIEBO_USERNAME=ABC123@rwth-aachen.de
SCIEBO_PASSWORD=your-secret-app-passcode
If you discover any security related issues, please email mail@johannes-schaefer.de instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.