This repository was archived by the owner on Jan 10, 2020. It is now read-only.
Update cms.php#198
Open
mattkatt wants to merge 1 commit into
Open
Conversation
FileService.php, when saving images, looks for a declaration in config/cms of `max-image-size`, with a default to 800px:
```php
//cms/src/Services/FileService.php
118 if ($isImage) {
119 $storage = Storage::disk(Config::get('cms.storage-location', 'local'));
120 $image = $storage->get($directory.$newFileName.'.'.$extension);
121
122 $image = InterventionImage::make($image)->resize(config('cms.max-image-size', 800), null, function ($constraint) {
123 $constraint->aspectRatio();
124 });
125
126 $imageResized = $image->stream();
127
128 $storage->delete($directory.$newFileName.'.'.$extension);
129 $storage->put($directory.$newFileName.'.'.$extension, $imageResized->__toString());
130 }
```
this config variable is not declared, and can be confusing if trying to upload hero_images larger than 800px. Propose adding the variable to the config/cms file by default
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FileService.php, when saving images, looks for a declaration in config/cms of
max-image-size, with a default to 800px:this config variable is not declared, and can be confusing if trying to upload hero_images larger than 800px. Propose adding the variable to the config/cms file by default