1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Updated folder permissions installation instructions & fixed issue with handling image saving on user creation

This commit is contained in:
Dan Brown
2016-02-02 07:34:48 +00:00
parent 4bb7f0613f
commit e87db96fc0
2 changed files with 7 additions and 4 deletions

View File

@ -3,6 +3,7 @@
use BookStack\Exceptions\ImageUploadException;
use BookStack\Image;
use BookStack\User;
use Exception;
use Intervention\Image\ImageManager;
use Illuminate\Contracts\Filesystem\Factory as FileSystem;
use Illuminate\Contracts\Filesystem\Filesystem as FileSystemInstance;
@ -88,9 +89,11 @@ class ImageService
}
$fullPath = $imagePath . $imageName;
if(!is_writable(dirname(public_path($fullPath)))) throw new ImageUploadException('Image Directory ' . public_path($fullPath) . ' is not writable by the server.');
$storage->put($fullPath, $imageData);
try {
$storage->put($fullPath, $imageData);
} catch (Exception $e) {
throw new ImageUploadException('Image Path ' . $fullPath . ' is not writable by the server.');
}
$imageDetails = [
'name' => $imageName,