Fixed error with raw preview

(Closes #184)
This commit is contained in:
Sergio Brighenti 2020-04-09 15:02:05 +02:00
parent e81a590eb0
commit 9890f09e81
4 changed files with 4 additions and 4 deletions

View file

@ -154,7 +154,7 @@ module.exports = function (grunt) {
command: '"./vendor/bin/phpstan" analyse app resources/lang bin install'
},
composer_no_dev: {
command: 'composer install --no-dev --prefer-dist'
command: 'composer update --no-dev --prefer-dist'
}
}

View file

@ -327,7 +327,7 @@ class MediaController extends Controller
set_time_limit(0);
$mime = $storage->getMimetype($media->storage_path);
if ((param($request, 'width') || param($request, 'height')) !== null && explode('/', $mime)[0] === 'image') {
if ((param($request, 'width') !== null || param($request, 'height') !== null) && explode('/', $mime)[0] === 'image') {
return $this->makeThumbnail($storage, $media, param($request, 'width'), param($request, 'height'), $disposition);
} else {
$stream = new Stream($storage->readStream($media->storage_path));

View file

@ -1,6 +1,6 @@
{
"name": "sergix44/xbackbone",
"version": "3.1.RC5",
"version": "3.1.RC6",
"description": "A lightweight ShareX PHP backend",
"type": "project",
"require": {

2
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "f9b195438102a5213e65b9aef73ad6ef",
"content-hash": "046f5b6b68e2073e25a43c0c24813053",
"packages": [
{
"name": "aws/aws-sdk-php",