Skip to content

Commit fb18323

Browse files
committed
⚡️ Add Public Url + Temporary Url for Google Drive
1 parent 6e02260 commit fb18323

File tree

3 files changed

+34
-2
lines changed

3 files changed

+34
-2
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ return [
119119

120120
### AsyncAws S3 Filesystem
121121

122+
See: [league/flysystem-async-aws-s3](https://github.com/thephpleague/flysystem-async-aws-s3)
123+
122124
Either run
123125

124126
```shell
@@ -159,6 +161,8 @@ return [
159161

160162
### AWS S3 Filesystem
161163

164+
See: [league/flysystem-aws-s3-v3](https://github.com/thephpleague/flysystem-aws-s3-v3)
165+
162166
Either run
163167

164168
```shell
@@ -199,6 +203,8 @@ return [
199203

200204
### Google Cloud Storage Filesystem
201205

206+
See: [league/flysystem-google-cloud-storage](https://github.com/thephpleague/flysystem-google-cloud-storage)
207+
202208
Either run
203209

204210
```shell
@@ -244,6 +250,8 @@ return [
244250

245251
### FTP Filesystem
246252

253+
See: [league/flysystem-ftp](https://github.com/thephpleague/flysystem-ftp)
254+
247255
Either run
248256

249257
```shell
@@ -290,6 +298,8 @@ return [
290298

291299
### SFTP Filesystem
292300

301+
See: [league/flysystem-sftp-v3](https://github.com/thephpleague/flysystem-sftp-v3)
302+
293303
Either run
294304

295305
```shell
@@ -332,6 +342,8 @@ return [
332342

333343
### WebDAV Filesystem
334344

345+
See: [league/flysystem-webdav](https://github.com/thephpleague/flysystem-webdav)
346+
335347
Either run
336348

337349
```shell
@@ -367,6 +379,8 @@ return [
367379

368380
### ZipArchive Filesystem
369381

382+
See: [league/flysystem-ziparchive](https://github.com/thephpleague/flysystem-ziparchive)
383+
370384
Either run
371385

372386
```shell
@@ -399,6 +413,8 @@ return [
399413

400414
### Google Drive Filesystem
401415

416+
See: [masbug/flysystem-google-drive-ext](https://github.com/masbug/flysystem-google-drive-ext)
417+
402418
Either run
403419

404420
```shell
@@ -443,6 +459,7 @@ The following adapters have URL File Action generation capabilities:
443459
- Local Component
444460
- FTP Component
445461
- SFTP Component
462+
- Google Drive Component
446463

447464
Configure `action` in `controller` as follows
448465

src/GoogleDriveComponent.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22

33
namespace diecoding\flysystem;
44

5+
use diecoding\flysystem\adapter\GoogleDriveAdapter;
56
use Google\Client;
67
use Google\Service\Drive;
7-
use League\Flysystem\PathPrefixing\PathPrefixedAdapter;
8-
use Masbug\Flysystem\GoogleDriveAdapter;
98
use yii\base\InvalidConfigException;
109

1110
/**

src/adapter/GoogleDriveAdapter.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace diecoding\flysystem\adapter;
6+
7+
use diecoding\flysystem\traits\ChecksumAdapterTrait;
8+
use diecoding\flysystem\traits\UrlGeneratorAdapterTrait;
9+
use League\Flysystem\ChecksumProvider;
10+
use League\Flysystem\UrlGeneration\PublicUrlGenerator;
11+
use League\Flysystem\UrlGeneration\TemporaryUrlGenerator;
12+
13+
final class GoogleDriveAdapter extends \Masbug\Flysystem\GoogleDriveAdapter implements ChecksumProvider, PublicUrlGenerator, TemporaryUrlGenerator
14+
{
15+
use UrlGeneratorAdapterTrait, ChecksumAdapterTrait;
16+
}

0 commit comments

Comments
 (0)