From: Dan Brown Date: Sun, 10 Jul 2016 09:15:38 +0000 (+0100) Subject: Merge branch 'patch-1' of git://github.com/younes0/BookStack into younes0-patch-1 X-Git-Tag: v0.12.0~1^2~21 X-Git-Url: http://source.bookstackapp.com/bookstack/commitdiff_plain/8b899a9cf055128c2864be20f58c4312013307a4?ds=sidebyside;hp=-c Merge branch 'patch-1' of git://github.com/younes0/BookStack into younes0-patch-1 --- 8b899a9cf055128c2864be20f58c4312013307a4 diff --combined app/Services/ImageService.php index 274172f0f,331a407c3..f645a06a5 --- a/app/Services/ImageService.php +++ b/app/Services/ImageService.php @@@ -95,7 -95,6 +95,7 @@@ class ImageServic try { $storage->put($fullPath, $imageData); + $storage->setVisibility($fullPath, 'public'); } catch (Exception $e) { throw new ImageUploadException('Image Path ' . $fullPath . ' is not writable by the server.'); } @@@ -168,7 -167,6 +168,7 @@@ $thumbData = (string)$thumb->encode(); $storage->put($thumbFilePath, $thumbData); + $storage->setVisibility($thumbFilePath, 'public'); $this->cache->put('images-' . $image->id . '-' . $thumbFilePath, $thumbFilePath, 60 * 72); return $this->getPublicUrl($thumbFilePath); @@@ -261,7 -259,7 +261,7 @@@ // Get the standard public s3 url if s3 is set as storage type if ($storageUrl == false && config('filesystems.default') === 's3') { $storageDetails = config('filesystems.disks.s3'); - $storageUrl = 'https://s3-' . $storageDetails['region'] . '.amazonaws.com/' . $storageDetails['bucket']; + $storageUrl = 'https://' . $storageDetails['bucket'] . '.s3.amazonaws.com'; } $this->storageUrl = $storageUrl;