Closed pmochine closed 2 years ago
Duplicate of existing discussion.
🎉 I just found a solution, because I looked up an alternative to dropbox. I found about google drive and looked up their code for Laravel. And there I found the solution:
The whole code so dropbox is working again:
<?php
namespace App\Providers;
use Illuminate\Filesystem\FilesystemAdapter;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\ServiceProvider;
use League\Flysystem\Filesystem;
use Spatie\Dropbox\Client as DropboxClient;
use Spatie\FlysystemDropbox\DropboxAdapter;
class DropboxServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
Storage::extend('dropbox', function ($app, $config) {
$client = new DropboxClient(
$config['authorization_token']
);
$adapter = new DropboxAdapter($client);
$driver = new Filesystem($adapter, ['case_sensitive' => false]);
return new FilesystemAdapter($driver, $adapter);
});
}
}
I updated my Laravel but I get the error when I try to backup.
I'm using a DropboxServiceProvider to extend the Storage for Dropbox
Besides that I saw that another person has the issue: https://github.com/spatie/flysystem-dropbox/discussions/83
Thank you <3