mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 16:51:40 +09:00
Fix missing temp directory when admin resizes image using magick
This commit is contained in:
parent
8671c058d5
commit
fd0e2a1cc3
1 changed files with 5 additions and 0 deletions
|
|
@ -389,6 +389,11 @@ class FileAdminController extends File
|
|||
$result = FileHandler::createImageFile(FileHandler::getRealPath($file->uploaded_filename), $temp_filename, $width, $height, $format, 'fill', $quality);
|
||||
if (!$result && !empty($config->magick_command))
|
||||
{
|
||||
$temp_dir = dirname($temp_filename);
|
||||
if (!Rhymix\Framework\Storage::isDirectory($temp_dir))
|
||||
{
|
||||
Rhymix\Framework\Storage::createDirectory($temp_dir);
|
||||
}
|
||||
$command = vsprintf('%s %s -resize %dx%d -quality %d %s %s %s', [
|
||||
\RX_WINDOWS ? escapeshellarg($config->magick_command) : $config->magick_command,
|
||||
escapeshellarg(FileHandler::getRealPath($file->uploaded_filename)),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue