mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-08-12 11:10:13 +00:00
Merge pull request #573 from csalzano/fix/dropbox-file-disk-creation
Bug fix in Dropbox file disk creation. Applies disk path.
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Providers;
|
namespace App\Providers;
|
||||||
|
|
||||||
|
use Illuminate\Filesystem\FilesystemAdapter;
|
||||||
use Illuminate\Support\Facades\Storage;
|
use Illuminate\Support\Facades\Storage;
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
use League\Flysystem\Filesystem;
|
use League\Flysystem\Filesystem;
|
||||||
@@ -28,7 +29,11 @@ class DropboxServiceProvider extends ServiceProvider
|
|||||||
$config['token']
|
$config['token']
|
||||||
);
|
);
|
||||||
|
|
||||||
return new Filesystem(new DropboxAdapter($client));
|
$root = trim($config['root'] ?? '', '/');
|
||||||
|
$adapter = new DropboxAdapter($client, $root);
|
||||||
|
$flysystem = new Filesystem($adapter);
|
||||||
|
|
||||||
|
return new FilesystemAdapter($flysystem, $adapter, $config);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user