Skip to content

Commit a7084bb

Browse files
committed
v3.0.0
1 parent d55085f commit a7084bb

File tree

9 files changed

+62
-55
lines changed

9 files changed

+62
-55
lines changed

Plugin.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
class Plugin extends PluginBase
99
{
10-
1110
public function pluginDetails()
1211
{
1312
return [

README.md

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,47 +13,35 @@ There are couple ways to install this plugin.
1313

1414
## Configuration
1515

16+
The first thing you need to do is to get an authorization token at Dropbox. A token can be generated in the [App Console](https://www.dropbox.com/developers/apps) for any Dropbox API app. You'll find more info at [the Dropbox Developer Blog](https://blogs.dropbox.com/developers/2014/05/generate-an-access-token-for-your-own-account/).
17+
1618
Add new filesystem disk in `disks` array in `config/filesystems.php`:
1719

1820
```
1921
'dropbox' => [
2022
'driver' => 'dropbox',
21-
'authorizationToken' => '',
23+
'authorization_token' => env('DROPBOX_ACCESS_TOKEN'),
2224
],
2325
```
2426

25-
Create a new app and generate an authorization token with the [Dropbox App Console](https://www.dropbox.com/developers/apps).
27+
Set generated authorization token `DROPBOX_ACCESS_TOKEN` in your `.env` file.
2628

27-
In this configuration file you can also set default filesystem and cloud disk.
29+
You can adjust resource storage (media, uploads, resources) configuration in `config/system.php` file.
2830

29-
To use Dropbox as default uploads/media storage for October installation update `config/cms.php`:
31+
## Like this plugin?
3032

31-
```
32-
'storage' => [
33+
If you like this plugin, give this plugin a Like or Make donation with [PayPal](https://www.paypal.me/mplodowski).
3334

34-
'uploads' => [
35-
'disk' => 'dropbox',
36-
'folder' => '',
37-
'path' => '',
38-
],
35+
## My other plugins
3936

40-
'media' => [
41-
'disk' => 'dropbox',
42-
'folder' => '',
43-
'path' => '',
44-
],
45-
46-
],
47-
```
48-
49-
> **Important note:** If you want to specify `folder` or `path` than you must ensure it exists on Dropbox.
37+
Please check my other [plugins](https://octobercms.com/author/Renatio).
5038

5139
## Support
5240

53-
Please use [GitHub Issues Page](https://github.com/mplodowski/dropboxadapter-plugin/issues) to report any issues with plugin.
41+
Please use [GitHub Issues Page](https://github.com/mplodowski/backupmanager-plugin-public/issues) to report any issues
42+
with plugin.
5443

5544
> Reviews should not be used for getting support or reporting bugs, if you need support please use the Plugin support link.
5645
57-
## Like this plugin?
58-
59-
If you like this plugin, give this plugin a Like or Make donation with [PayPal](https://www.paypal.me/mplodowski).
46+
Icon made by [Darius Dan](https://www.flaticon.com/authors/darius-dan)
47+
from [www.flaticon.com](https://www.flaticon.com/).

UPGRADE.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1-
# Upgrade guide
1+
# Upgrade guide
2+
3+
## Upgrading To 3.0.0
4+
5+
Plugin requires October CMS version 3.0 or higher, Laravel 9.0 or higher and PHP >=8.0.
6+
7+
Drop support for October CMS version 2.x.

composer.json

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,30 @@
11
{
2-
"name": "renatio/dropboxadapter-plugin",
3-
"type": "october-plugin",
4-
"description": "Dropbox filesystem adapter plugin for OctoberCMS",
5-
"homepage": "https://octobercms.com/plugin/renatio-dropboxadapter",
6-
"keywords": ["octobercms-plugin", "octobercms", "php", "laravel", "dropbox"],
7-
"license": "MIT",
8-
"authors": [
9-
{
10-
"name": "Michal Plodowski",
11-
"email": "[email protected]"
2+
"name": "renatio/dropboxadapter-plugin",
3+
"type": "october-plugin",
4+
"description": "Dropbox filesystem adapter plugin for October CMS.",
5+
"homepage": "https://octobercms.com/plugin/renatio-dropboxadapter",
6+
"keywords": [
7+
"octobercms-plugin",
8+
"octobercms",
9+
"php",
10+
"laravel",
11+
"dropbox"
12+
],
13+
"license": "MIT",
14+
"authors": [
15+
{
16+
"name": "Michal Plodowski",
17+
"email": "[email protected]"
18+
}
19+
],
20+
"require": {
21+
"spatie/flysystem-dropbox": "^2.0",
22+
"october/rain": "^3.0",
23+
"composer/installers": "~1.0"
24+
},
25+
"config": {
26+
"allow-plugins": {
27+
"composer/installers": true
28+
}
1229
}
13-
],
14-
"require": {
15-
"php": ">=7.0",
16-
"spatie/flysystem-dropbox": "^1.0",
17-
"composer/installers": "~1.0"
18-
}
19-
}
30+
}

docs/banner.png

190 KB
Loading

docs/logo.png

4.06 KB
Loading

lang/en/lang.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
return [
44
'plugin' => [
55
'name' => 'Dropbox Adapter Plugin',
6-
'description' => 'Add Dropbox filesystem adapter to OctoberCMS'
6+
'description' => 'Add Dropbox filesystem adapter to October CMS.',
77
],
88
];

providers/DropboxServiceProvider.php

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,27 @@
22

33
namespace Renatio\DropboxAdapter\Providers;
44

5+
use Illuminate\Filesystem\FilesystemAdapter;
56
use Illuminate\Support\Facades\Storage;
67
use Illuminate\Support\ServiceProvider;
78
use League\Flysystem\Filesystem;
8-
use Spatie\Dropbox\Client as DropboxClient;
9+
use Spatie\Dropbox\Client;
910
use Spatie\FlysystemDropbox\DropboxAdapter;
1011

1112
class DropboxServiceProvider extends ServiceProvider
1213
{
13-
1414
public function boot()
1515
{
1616
Storage::extend('dropbox', function ($app, $config) {
17-
$client = new DropboxClient(
18-
$config['authorizationToken']
19-
);
17+
$adapter = new DropboxAdapter(new Client(
18+
$config['authorization_token']
19+
));
2020

21-
$adapter = new DropboxAdapter($client);
22-
23-
return new Filesystem($adapter, ['case_sensitive' => false]);
21+
return new FilesystemAdapter(
22+
new Filesystem($adapter, $config),
23+
$adapter,
24+
$config
25+
);
2426
});
2527
}
2628

updates/version.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
1.0.1: Initialize plugin.
2-
2.0.0: Support Dropbox v2 API.
1+
v1.0.1: Initialize plugin.
2+
v2.0.0: Support Dropbox v2 API.
3+
v3.0.0: Require October CMS 3.0.

0 commit comments

Comments
 (0)