Skip to content

Commit eb19aad

Browse files
committed
Merge branch 'v0.30.x' into release
2 parents 06c81e6 + 884664b commit eb19aad

File tree

6 files changed

+134
-147
lines changed

6 files changed

+134
-147
lines changed

.env.example

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@
1212
APP_KEY=SomeRandomString
1313

1414
# Application URL
15-
# Remove the hash below and set a URL if using BookStack behind
16-
# a proxy or if using a third-party authentication option.
1715
# This must be the root URL that you want to host BookStack on.
18-
# All URL's in BookStack will be generated using this value.
19-
#APP_URL=https://example.com
16+
# All URLs in BookStack will be generated using this value
17+
# to ensure URLs generated are consistent and secure.
18+
# If you change this in the future you may need to run a command
19+
# to update stored URLs in the database. Command example:
20+
# php artisan bookstack:update-url https://old.example.com https://new.example.com
21+
APP_URL=https://example.com
2022

2123
# Database details
2224
DB_HOST=localhost
@@ -28,8 +30,8 @@ DB_PASSWORD=database_user_password
2830
# Can be 'smtp' or 'sendmail'
2931
MAIL_DRIVER=smtp
3032

31-
# Mail sender options
32-
MAIL_FROM_NAME=BookStack
33+
# Mail sender details
34+
MAIL_FROM_NAME="BookStack"
3335
3436

3537
# SMTP mail options

app/Config/filesystems.php

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,6 @@
4242
'root' => storage_path(),
4343
],
4444

45-
'ftp' => [
46-
'driver' => 'ftp',
47-
'host' => 'ftp.example.com',
48-
'username' => 'your-username',
49-
'password' => 'your-password',
50-
],
51-
5245
's3' => [
5346
'driver' => 's3',
5447
'key' => env('STORAGE_S3_KEY', 'your-key'),
@@ -59,16 +52,6 @@
5952
'use_path_style_endpoint' => env('STORAGE_S3_ENDPOINT', null) !== null,
6053
],
6154

62-
'rackspace' => [
63-
'driver' => 'rackspace',
64-
'username' => 'your-username',
65-
'key' => 'your-key',
66-
'container' => 'your-container',
67-
'endpoint' => 'https://identity.api.rackspacecloud.com/v2.0/',
68-
'region' => 'IAD',
69-
'url_type' => 'publicURL',
70-
],
71-
7255
],
7356

7457
];

app/Uploads/AttachmentService.php

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,29 @@
22

33
use BookStack\Exceptions\FileUploadException;
44
use Exception;
5+
use Illuminate\Contracts\Filesystem\Factory as FileSystem;
6+
use Illuminate\Contracts\Filesystem\Filesystem as FileSystemInstance;
57
use Illuminate\Support\Str;
68
use Symfony\Component\HttpFoundation\File\UploadedFile;
79

8-
class AttachmentService extends UploadService
10+
class AttachmentService
911
{
1012

13+
protected $fileSystem;
14+
15+
/**
16+
* AttachmentService constructor.
17+
*/
18+
public function __construct(FileSystem $fileSystem)
19+
{
20+
$this->fileSystem = $fileSystem;
21+
}
22+
23+
1124
/**
1225
* Get the storage that will be used for storing files.
13-
* @return \Illuminate\Contracts\Filesystem\Filesystem
1426
*/
15-
protected function getStorage()
27+
protected function getStorage(): FileSystemInstance
1628
{
1729
$storageType = config('filesystems.attachments');
1830

0 commit comments

Comments
 (0)