mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
Merge branch 'rhymix:master' into master
This commit is contained in:
commit
dd8fc890f4
39 changed files with 396 additions and 220 deletions
|
|
@ -67,9 +67,10 @@ class FileAdminController extends File
|
|||
{
|
||||
// Default settings
|
||||
$config = getModel('module')->getModuleConfig('file') ?: new stdClass;
|
||||
$config->allowed_filesize = Context::get('allowed_filesize');
|
||||
$config->allowed_attach_size = Context::get('allowed_attach_size');
|
||||
$config->allowed_filesize = intval(Context::get('allowed_filesize'));
|
||||
$config->allowed_attach_size = intval(Context::get('allowed_attach_size'));
|
||||
$config->allowed_filetypes = Context::get('allowed_filetypes');
|
||||
$config->pre_conversion_filesize = intval(Context::get('pre_conversion_filesize')) ?: null;
|
||||
|
||||
// Image settings
|
||||
$config->image_autoconv = [];
|
||||
|
|
@ -121,6 +122,10 @@ class FileAdminController extends File
|
|||
$config->magick_command = escape(utf8_trim(Context::get('magick_command'))) ?: '';
|
||||
}
|
||||
|
||||
// Timeouts
|
||||
$config->ffmpeg_timeout = max(0, intval(Context::get('ffmpeg_timeout'))) ?: null;
|
||||
$config->magick_timeout = max(0, intval(Context::get('magick_timeout'))) ?: null;
|
||||
|
||||
// Check maximum file size (probably not necessary anymore)
|
||||
if (PHP_INT_SIZE < 8)
|
||||
{
|
||||
|
|
@ -147,6 +152,28 @@ class FileAdminController extends File
|
|||
$config->allowed_filetypes = '*.*';
|
||||
}
|
||||
|
||||
// Generate pre-conversion whitelist
|
||||
$config->pre_conversion_types = [];
|
||||
foreach ($config->image_autoconv ?? [] as $source_type => $target_type)
|
||||
{
|
||||
if (!empty($target_type) && $target_type !== true)
|
||||
{
|
||||
$config->pre_conversion_types[] = $source_type;
|
||||
if ($source_type === 'jpg')
|
||||
{
|
||||
$config->pre_conversion_types[] = 'jpeg';
|
||||
}
|
||||
}
|
||||
elseif ($source_type === 'gif2mp4' && $target_type === true)
|
||||
{
|
||||
$config->pre_conversion_types[] = 'gif';
|
||||
}
|
||||
}
|
||||
if ($config->video_autoconv['any2mp4'])
|
||||
{
|
||||
$config->pre_conversion_types = array_merge($config->pre_conversion_types, ['mp4', 'webm', 'ogv', 'avi', 'mkv', 'mov', 'mpg', 'mpe', 'mpeg', 'wmv', 'm4v', 'flv']);
|
||||
}
|
||||
|
||||
// Save and redirect
|
||||
$output = getController('module')->insertModuleConfig('file', $config);
|
||||
$returnUrl = Context::get('success_return_url') ?: getNotEncodedUrl('', 'module', 'admin', 'act', 'dispFileAdminUploadConfig');
|
||||
|
|
@ -206,9 +233,10 @@ class FileAdminController extends File
|
|||
if(!Context::get('use_default_file_config'))
|
||||
{
|
||||
$config->use_default_file_config = 'N';
|
||||
$config->allowed_filesize = Context::get('allowed_filesize');
|
||||
$config->allowed_attach_size = Context::get('allowed_attach_size');
|
||||
$config->allowed_filesize = intval(Context::get('allowed_filesize'));
|
||||
$config->allowed_attach_size = intval(Context::get('allowed_attach_size'));
|
||||
$config->allowed_filetypes = Context::get('allowed_filetypes');
|
||||
$config->pre_conversion_filesize = intval(Context::get('pre_conversion_filesize')) ?: null;
|
||||
|
||||
// Check maximum file size
|
||||
if (PHP_INT_SIZE < 8)
|
||||
|
|
@ -274,6 +302,20 @@ class FileAdminController extends File
|
|||
$download_grant = Context::get('download_grant');
|
||||
$config->download_grant = is_array($download_grant) ? array_values($download_grant) : array($download_grant);
|
||||
|
||||
// Create pre-conversion whitelist
|
||||
$config->pre_conversion_types = [];
|
||||
foreach ($config->image_autoconv ?? [] as $source_type => $target_type)
|
||||
{
|
||||
if ($target_type && $target_type !== true)
|
||||
{
|
||||
$config->pre_conversion_types[] = $source_type;
|
||||
if ($source_type === 'jpg')
|
||||
{
|
||||
$config->pre_conversion_types[] = 'jpeg';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Update
|
||||
$oModuleController = getController('module');
|
||||
foreach(explode(',', Context::get('target_module_srl')) as $module_srl)
|
||||
|
|
@ -388,7 +430,7 @@ class FileAdminController extends File
|
|||
// Resize the image using GD or ImageMagick.
|
||||
$config = FileModel::getFileConfig();
|
||||
$result = FileHandler::createImageFile(FileHandler::getRealPath($file->uploaded_filename), $temp_filename, $width, $height, $format, 'fill', $quality);
|
||||
if (!$result && !empty($config->magick_command))
|
||||
if (!$result && !empty($config->magick_command) && Rhymix\Framework\Storage::isExecutable($config->magick_command))
|
||||
{
|
||||
$temp_dir = dirname($temp_filename);
|
||||
if (!Rhymix\Framework\Storage::isDirectory($temp_dir))
|
||||
|
|
@ -396,13 +438,17 @@ class FileAdminController extends File
|
|||
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,
|
||||
Rhymix\Framework\Security::sanitize($config->magick_command, 'command'),
|
||||
escapeshellarg(FileHandler::getRealPath($file->uploaded_filename)),
|
||||
$width, $height, $quality,
|
||||
'-auto-orient -strip',
|
||||
'-limit memory 64MB -limit map 128MB -limit disk 1GB',
|
||||
escapeshellarg($temp_filename),
|
||||
]);
|
||||
if (!\RX_WINDOWS && isset($config->magick_timeout) && $config->magick_timeout > 0)
|
||||
{
|
||||
$command = 'timeout -k1 ' . intval($config->magick_timeout) . ' ' . $command;
|
||||
}
|
||||
@exec($command, $output, $return_var);
|
||||
$result = $return_var === 0 ? true : false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,14 +15,14 @@ class FileAdminView extends File
|
|||
{
|
||||
// Options to get a list
|
||||
$args = new stdClass();
|
||||
$args->page = Context::get('page'); // /< Page
|
||||
$args->list_count = 30; // /< Number of documents that appear on a single page
|
||||
$args->page_count = 10; // /< Number of pages that appear in the page navigation
|
||||
|
||||
$args->sort_index = Context::get('sort_index') ?? 'file_srl'; // /< Sorting values
|
||||
$args->order_type = Context::get('order_type') ?? null;
|
||||
$args->list_count = intval(Context::get('list_count')) ?: 30;
|
||||
$args->page_count = 10;
|
||||
$args->page = max(1, intval(Context::get('page')));
|
||||
$args->sort_index = Context::get('sort_index') ?: 'file_srl';
|
||||
$args->order_type = strtolower(Context::get('order_type')) === 'asc' ? 'asc' : 'desc';
|
||||
$args->isvalid = Context::get('isvalid');
|
||||
$args->module_srl = Context::get('module_srl');
|
||||
|
||||
// Get a list
|
||||
$oFileAdminModel = getAdminModel('file');
|
||||
$output = $oFileAdminModel->getFileList($args);
|
||||
|
|
|
|||
|
|
@ -102,6 +102,15 @@ class FileController extends File
|
|||
$module_config = FileModel::getFileConfig($module_srl);
|
||||
$allowed_attach_size = $module_config->allowed_attach_size * 1024 * 1024;
|
||||
$allowed_filesize = $module_config->allowed_filesize * 1024 * 1024;
|
||||
if (!empty($module_config->pre_conversion_filesize) && !empty($module_config->pre_conversion_types))
|
||||
{
|
||||
$extension = strtolower(array_last(explode('.', $file_info['name'])));
|
||||
if ($extension && in_array($extension, $module_config->pre_conversion_types))
|
||||
{
|
||||
$allowed_attach_size = ($allowed_attach_size - $allowed_filesize) + ($module_config->pre_conversion_filesize * 1024 * 1024);
|
||||
$allowed_filesize = $module_config->pre_conversion_filesize * 1024 * 1024;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($total_size > $allowed_filesize)
|
||||
{
|
||||
|
|
@ -1158,10 +1167,14 @@ class FileController extends File
|
|||
public function adjustUploadedImage($file_info, $config)
|
||||
{
|
||||
// Get image information
|
||||
if (in_array($file_info['extension'], ['avif', 'heic', 'heif']) && !empty($config->magick_command))
|
||||
if (in_array($file_info['extension'], ['avif', 'heic', 'heif']) && !empty($config->magick_command) && Rhymix\Framework\Storage::isExecutable($config->magick_command))
|
||||
{
|
||||
$command = \RX_WINDOWS ? escapeshellarg($config->magick_command) : $config->magick_command;
|
||||
$command = Rhymix\Framework\Security::sanitize($config->magick_command, 'command');
|
||||
$command .= ' identify ' . escapeshellarg($file_info['tmp_name']);
|
||||
if (!\RX_WINDOWS && isset($config->magick_timeout) && $config->magick_timeout > 0)
|
||||
{
|
||||
$command = 'timeout -k1 ' . intval($config->magick_timeout) . ' ' . $command;
|
||||
}
|
||||
@exec($command, $output, $return_var);
|
||||
if ($return_var === 0 && preg_match('/([A-Z]+) ([0-9]+)x([0-9]+)/', substr(array_last($output), strlen($file_info['tmp_name'])), $matches))
|
||||
{
|
||||
|
|
@ -1326,11 +1339,15 @@ class FileController extends File
|
|||
$adjusted['height'] -= $adjusted['height'] % 2;
|
||||
|
||||
// Convert using ffmpeg
|
||||
$command = \RX_WINDOWS ? escapeshellarg($config->ffmpeg_command) : $config->ffmpeg_command;
|
||||
$command = Rhymix\Framework\Security::sanitize($config->ffmpeg_command, 'command');
|
||||
$command .= ' -nostdin -i ' . escapeshellarg($file_info['tmp_name']);
|
||||
$command .= ' -movflags +faststart -pix_fmt yuv420p -c:v libx264 -crf 23';
|
||||
$command .= sprintf(' -vf "scale=%d:%d"', $adjusted['width'], $adjusted['height']);
|
||||
$command .= ' ' . escapeshellarg($output_name);
|
||||
if (!\RX_WINDOWS && isset($config->ffmpeg_timeout) && $config->ffmpeg_timeout > 0)
|
||||
{
|
||||
$command = 'timeout -k1 ' . intval($config->ffmpeg_timeout) . ' ' . $command;
|
||||
}
|
||||
@exec($command, $output, $return_var);
|
||||
$result = $return_var === 0 ? true : false;
|
||||
|
||||
|
|
@ -1352,7 +1369,7 @@ class FileController extends File
|
|||
|
||||
// Convert using magick
|
||||
$command = vsprintf('%s %s -resize %dx%d -quality %d %s %s %s', [
|
||||
\RX_WINDOWS ? escapeshellarg($config->magick_command) : $config->magick_command,
|
||||
Rhymix\Framework\Security::sanitize($config->magick_command, 'command'),
|
||||
escapeshellarg($file_info['tmp_name']),
|
||||
$adjusted['width'],
|
||||
$adjusted['height'],
|
||||
|
|
@ -1361,6 +1378,10 @@ class FileController extends File
|
|||
'-limit memory 64MB -limit map 128MB -limit disk 1GB',
|
||||
escapeshellarg($output_name),
|
||||
]);
|
||||
if (!\RX_WINDOWS && isset($config->magick_timeout) && $config->magick_timeout > 0)
|
||||
{
|
||||
$command = 'timeout -k1 ' . intval($config->magick_timeout) . ' ' . $command;
|
||||
}
|
||||
@exec($command, $output, $return_var);
|
||||
$result = $return_var === 0 ? true : false;
|
||||
}
|
||||
|
|
@ -1370,10 +1391,10 @@ class FileController extends File
|
|||
$result = FileHandler::createImageFile($file_info['tmp_name'], $output_name, $adjusted['width'], $adjusted['height'], $adjusted['type'], 'fill', $adjusted['quality'], $adjusted['rotate']);
|
||||
|
||||
// If the image cannot be resized using GD, try ImageMagick.
|
||||
if (!$result && !empty($config->magick_command))
|
||||
if (!$result && !empty($config->magick_command) && Rhymix\Framework\Storage::isExecutable($config->magick_command))
|
||||
{
|
||||
$command = vsprintf('%s %s -resize %dx%d -quality %d %s %s %s', [
|
||||
\RX_WINDOWS ? escapeshellarg($config->magick_command) : $config->magick_command,
|
||||
Rhymix\Framework\Security::sanitize($config->magick_command, 'command'),
|
||||
escapeshellarg($file_info['tmp_name']),
|
||||
$adjusted['width'],
|
||||
$adjusted['height'],
|
||||
|
|
@ -1382,6 +1403,10 @@ class FileController extends File
|
|||
'-limit memory 64MB -limit map 128MB -limit disk 1GB',
|
||||
escapeshellarg($output_name),
|
||||
]);
|
||||
if (!\RX_WINDOWS && isset($config->magick_timeout) && $config->magick_timeout > 0)
|
||||
{
|
||||
$command = 'timeout -k1 ' . intval($config->magick_timeout) . ' ' . $command;
|
||||
}
|
||||
@exec($command, $output, $return_var);
|
||||
$result = $return_var === 0 ? true : false;
|
||||
}
|
||||
|
|
@ -1414,7 +1439,7 @@ class FileController extends File
|
|||
}
|
||||
|
||||
// Analyze video file
|
||||
$command = \RX_WINDOWS ? escapeshellarg($config->ffprobe_command) : $config->ffprobe_command;
|
||||
$command = Rhymix\Framework\Security::sanitize($config->ffprobe_command, 'command');
|
||||
$command .= ' -v quiet -print_format json -show_streams';
|
||||
$command .= ' ' . escapeshellarg($file_info['tmp_name']);
|
||||
@exec($command, $output, $return_var);
|
||||
|
|
@ -1558,7 +1583,7 @@ class FileController extends File
|
|||
$adjusted['height'] -= $adjusted['height'] % 2;
|
||||
|
||||
// Convert using ffmpeg
|
||||
$command = \RX_WINDOWS ? escapeshellarg($config->ffmpeg_command) : $config->ffmpeg_command;
|
||||
$command = Rhymix\Framework\Security::sanitize($config->ffmpeg_command, 'command');
|
||||
$command .= ' -nostdin -i ' . escapeshellarg($file_info['tmp_name']);
|
||||
if ($adjusted['duration'] !== $file_info['duration'])
|
||||
{
|
||||
|
|
@ -1568,6 +1593,10 @@ class FileController extends File
|
|||
$command .= empty($stream_info['audio']) ? ' -an' : ' -acodec aac';
|
||||
$command .= sprintf(' -vf "scale=%d:%d"', $adjusted['width'], $adjusted['height']);
|
||||
$command .= ' ' . escapeshellarg($output_name);
|
||||
if (!\RX_WINDOWS && isset($config->ffmpeg_timeout) && $config->ffmpeg_timeout > 0)
|
||||
{
|
||||
$command = 'timeout -k1 ' . intval($config->ffmpeg_timeout) . ' ' . $command;
|
||||
}
|
||||
@exec($command, $output, $return_var);
|
||||
$result = $return_var === 0 ? true : false;
|
||||
|
||||
|
|
@ -1597,9 +1626,13 @@ class FileController extends File
|
|||
if ($config->video_thumbnail)
|
||||
{
|
||||
$thumbnail_name = $file_info['tmp_name'] . '.thumbnail.jpeg';
|
||||
$command = \RX_WINDOWS ? escapeshellarg($config->ffmpeg_command) : $config->ffmpeg_command;
|
||||
$command = Rhymix\Framework\Security::sanitize($config->ffmpeg_command, 'command');
|
||||
$command .= sprintf(' -ss 00:00:00.%d -i %s -vframes 1', mt_rand(0, 99), escapeshellarg($file_info['tmp_name']));
|
||||
$command .= ' -nostdin ' . escapeshellarg($thumbnail_name);
|
||||
if (!\RX_WINDOWS && isset($config->ffmpeg_timeout) && $config->ffmpeg_timeout > 0)
|
||||
{
|
||||
$command = 'timeout -k1 ' . intval($config->ffmpeg_timeout) . ' ' . $command;
|
||||
}
|
||||
@exec($command, $output, $return_var);
|
||||
if ($return_var === 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ $lang->allowed_filesize = 'Maximum File Size';
|
|||
$lang->allowed_filesize_exceeded = 'The file is too large. The maximum allowed filesize is %s.';
|
||||
$lang->allowed_attach_size = 'Maximum Attachments';
|
||||
$lang->allowed_filetypes = 'Allowed extentsions';
|
||||
$lang->pre_conversion_filesize = 'Pre-conversion Grace Size';
|
||||
$lang->download_short_url = 'Use short URL';
|
||||
$lang->inline_download_format = 'Open in current window';
|
||||
$lang->inline_download_image = 'Image';
|
||||
|
|
@ -45,6 +46,7 @@ $lang->about_allowed_filesize_global = 'This is the global limit on the size of
|
|||
$lang->about_allowed_attach_size_global = 'This is the global limit on the combined size of all attachments in one document.';
|
||||
$lang->about_allowed_size_limits = 'The file size will be limited to the value set in php.ini (%sB) in IE9 and below and older Android browsers.';
|
||||
$lang->about_allowed_filetypes = 'Rhymix no longer uses the old *.* syntax. Simply list the extensions you wish to allow.<br />Please use a comma (,) to separate items: e.g. doc, zip, pdf';
|
||||
$lang->about_pre_conversion_filesize = 'If an image or video might be converted as configured below, it will be allowed up to this size, and checked again after conversion.<br>If this configuration is empty, the file must be below the allowed size both before and after conversion.';
|
||||
$lang->about_save_changelog = 'Keep a log of new and deleted files in the database.';
|
||||
$lang->cmd_delete_checked_file = 'Delete Selected Item(s)';
|
||||
$lang->cmd_move_to_document = 'Move to Document';
|
||||
|
|
@ -102,15 +104,15 @@ $lang->max_image_size_same_format_to_jpg = 'Convert to JPG';
|
|||
$lang->max_image_size_same_format_to_webp = 'Convert to WebP';
|
||||
$lang->max_image_size_admin = 'Also apply to administrator';
|
||||
$lang->image_quality_adjustment = 'Image Quality';
|
||||
$lang->about_image_quality_adjustment = 'adjust the quality of images that will is converted by other settings.<br />If set to more than 75% (Standard), the file size may be larger than the original.';
|
||||
$lang->about_image_quality_adjustment = 'Adjust the quality of images that will be converted by other settings.<br />If set to more than 75% (Standard), the file size may be larger than the original.';
|
||||
$lang->image_autorotate = 'Fix Image Rotation';
|
||||
$lang->about_image_autorotate = 'correct images that are rotated by mobile devices.';
|
||||
$lang->about_image_autorotate = 'Correct images that are rotated by mobile devices.';
|
||||
$lang->image_remove_exif_data = 'Remove EXIF';
|
||||
$lang->about_image_remove_exif_data = 'remove EXIF data including camera, GPS information, and more in image file for privacy.<br />Even if this option is not used, EXIF data may be removed when the image is converted by other settings.';
|
||||
$lang->about_image_remove_exif_data = 'Remove EXIF data including camera, GPS information, and more in image file for privacy.<br />Even if this option is not used, EXIF data may be removed when the image is converted by other settings.';
|
||||
$lang->image_always_reencode = 'Always Reencode';
|
||||
$lang->about_image_always_reencode = 'Reencode images to a constant quality even if they do not meet one of the conditions above. This may help save disk space and traffic.';
|
||||
$lang->image_autoconv_gif2mp4 = 'Convert GIF to MP4';
|
||||
$lang->about_image_autoconv_gif2mp4 = 'convert animated GIF images into MP4 videos to save storage and bandwidth.<br />This requires ffmpeg settings below. Videos may not play properly in older browsers.';
|
||||
$lang->about_image_autoconv_gif2mp4 = 'Convert animated GIF images into MP4 videos to save storage and bandwidth.<br />This requires ffmpeg settings below. Videos may not play properly in older browsers.';
|
||||
$lang->max_video_size = 'Limit Video Size';
|
||||
$lang->about_max_video_size = 'Limit the dimensions of uploaded videos. Note that this is only indirectly related to file size.';
|
||||
$lang->max_video_duration = 'Limit Video Duration';
|
||||
|
|
@ -120,15 +122,19 @@ $lang->about_video_autoconv_any2mp4 = 'Convert all other types of videos to MP4
|
|||
$lang->video_always_reencode = 'Always Reencode';
|
||||
$lang->about_video_always_reencode = 'Reencode videos to a constant quality even if they do not meet one of the conditions above. This may help save disk space and traffic.';
|
||||
$lang->video_thumbnail = 'Video Thumbnail';
|
||||
$lang->about_video_thumbnail = 'extract a thumbnail image from uploaded video.';
|
||||
$lang->about_video_thumbnail = 'Extract a thumbnail image from uploaded video.';
|
||||
$lang->video_mp4_gif_time = 'Play Like GIF';
|
||||
$lang->about_video_mp4_gif_time = 'treat silent MP4 videos with duration less than the set time as GIF images, and play with auto and loop.';
|
||||
$lang->about_video_mp4_gif_time = 'Treat silent MP4 videos with duration less than the set time as GIF images, and play with auto and loop.';
|
||||
$lang->external_program_paths = 'Paths to External Programs';
|
||||
$lang->ffmpeg_path = 'Absolute Path to ffmpeg';
|
||||
$lang->ffprobe_path = 'Absolute Path to ffprobe';
|
||||
$lang->ffmpeg_timeout = 'ffmpeg Timeout';
|
||||
$lang->magick_path = 'Absolute Path to magick';
|
||||
$lang->magick_timeout = 'magick Timeout';
|
||||
$lang->about_ffmpeg_path = 'Rhymix uses ffmpeg to convert video files.';
|
||||
$lang->about_ffmpeg_timeout = 'If the video conversion task is not completed within a certain time, it will be terminated.<br />Proper timeout settings can help manage server load.<br />However, if set longer than the PHP execution time limit (%d seconds), the conversion result will not be saved.';
|
||||
$lang->about_magick_path = 'Rhymix uses magick to convert newer image formats such as AVIF and HEIC.<br />Note that the \'convert\' command from previous versions of ImageMagick doesn\'t support these formats.<br />The latest version can be downloaded from their <a href="https://imagemagick.org/script/download.php" target="_blank">official site</a>.';
|
||||
$lang->about_magick_timeout = 'If the image conversion task is not completed within a certain time, it will be terminated.<br />Proper timeout settings can help manage server load.<br />However, if set longer than the PHP execution time limit (%d seconds), the conversion result will not be saved.';
|
||||
$lang->msg_cannot_use_exec = 'The exec() function is disabled on this server.';
|
||||
$lang->msg_cannot_use_ffmpeg = 'In order to use this feature, PHP must be able to execute \'ffmpeg\' and \'ffprobe\' commands.';
|
||||
$lang->msg_cannot_use_exif = 'In order to use this feature, PHP must be installed with the \'exif\' extension.';
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ $lang->allowed_filesize_exceeded = '파일이 너무 큽니다. 용량 제한은
|
|||
$lang->allowed_attach_size = '문서 첨부 제한';
|
||||
$lang->allowed_filetypes = '허용 확장자';
|
||||
$lang->allow_multimedia_direct_download = '멀티미디어 파일 직접 접근 허용';
|
||||
$lang->pre_conversion_filesize = '변환 전 유예 용량';
|
||||
$lang->download_short_url = '다운로드시 짧은주소 사용';
|
||||
$lang->inline_download_format = '다운로드시 현재 창 사용';
|
||||
$lang->inline_download_image = '이미지';
|
||||
|
|
@ -45,6 +46,7 @@ $lang->about_allowed_filesize_global = '관리자를 포함하여 사이트 전
|
|||
$lang->about_allowed_attach_size_global = '관리자를 포함하여 사이트 전체에 적용되는 문서당 총 첨부 용량 제한입니다.';
|
||||
$lang->about_allowed_size_limits = 'IE9 이하, 구버전 안드로이드 등에서는 php.ini에서 지정한 %sB로 제한됩니다.';
|
||||
$lang->about_allowed_filetypes = '업로드를 허용할 확장자 목록입니다. 구 버전의 *.* 문법은 사용하지 않습니다.<br />여러 개 입력시 쉼표(,)을 이용해서 구분해 주세요. 예) doc, zip, pdf';
|
||||
$lang->about_pre_conversion_filesize = '변환 대상인 이미지 또는 동영상은 설정한 용량만큼 우선 업로드를 허용하고, 변환 후 용량을 기준으로 다시 확인합니다.<br>설정을 비워 둘 경우, 변환 전후 용량을 동일하게 제한합니다.';
|
||||
$lang->about_save_changelog = '파일 저장 및 삭제 내역을 DB에 기록합니다.';
|
||||
$lang->cmd_delete_checked_file = '선택항목 삭제';
|
||||
$lang->cmd_move_to_document = '문서로 이동';
|
||||
|
|
@ -126,9 +128,13 @@ $lang->about_video_mp4_gif_time = '설정된 시간 이하의 길이를 가진
|
|||
$lang->external_program_paths = '외부 프로그램 경로';
|
||||
$lang->ffmpeg_path = 'ffmpeg 절대경로';
|
||||
$lang->ffprobe_path = 'ffprobe 절대경로';
|
||||
$lang->ffmpeg_timeout = 'ffmpeg 타임아웃';
|
||||
$lang->magick_path = 'magick 절대경로';
|
||||
$lang->magick_timeout = 'magick 타임아웃';
|
||||
$lang->about_ffmpeg_path = '동영상 변환에 사용합니다.';
|
||||
$lang->about_ffmpeg_timeout = '동영상 변환 작업이 일정 시간 안에 완료되지 않으면 강제로 종료합니다.<br />적절한 타임아웃 설정은 서버 부하 관리에 도움이 됩니다.<br />단, PHP 실행 제한 시간(%d초)보다 길게 설정할 경우 변환 결과가 저장되지 않습니다.';
|
||||
$lang->about_magick_path = 'AVIF, HEIC 등 일부 이미지 변환에 사용합니다.<br />구 버전 ImageMagick의 convert 명령은 이러한 포맷을 지원하지 않습니다.<br />새 버전은 <a href="https://imagemagick.org/script/download.php" target="_blank">공식 사이트</a>에서 다운받을 수 있습니다.';
|
||||
$lang->about_magick_timeout = '이미지 변환 작업이 일정 시간 안에 완료되지 않으면 강제로 종료합니다.<br />적절한 타임아웃 설정은 서버 부하 관리에 도움이 됩니다.<br />단, PHP 실행 제한 시간(%d초)보다 길게 설정할 경우 변환 결과가 저장되지 않습니다.';
|
||||
$lang->msg_cannot_use_exec = '이 서버에서 exec() 함수를 사용할 수 없습니다.';
|
||||
$lang->msg_cannot_use_ffmpeg = '이 기능을 사용하려면 PHP에서 ffmpeg 및 ffprobe 명령을 실행할 수 있어야 합니다.';
|
||||
$lang->msg_cannot_use_exif = '이 기능을 사용하려면 PHP exif 확장모듈이 필요합니다.';
|
||||
|
|
|
|||
|
|
@ -34,6 +34,13 @@
|
|||
<p class="x_help-block">{sprintf($lang->about_allowed_attach_size, getUrl('', 'module', 'admin', 'act', 'dispFileAdminUploadConfig'))}<br />{sprintf($lang->about_allowed_size_limits, ini_get('upload_max_filesize'))}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label for="allowedFiletypes" class="x_control-label">{$lang->pre_conversion_filesize}</label>
|
||||
<div class="x_controls">
|
||||
<input type="number" min="0" name="pre_conversion_filesize" id="pre_conversion_filesize" value="{$config->pre_conversion_filesize ?? ''}" size="7" style="min-width:80px" /> MB
|
||||
<p class="x_help-block">{$lang->about_pre_conversion_filesize}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label for="allowed_filetypes" class="x_control-label">{$lang->allowed_filetypes}</label>
|
||||
<div class="x_controls">
|
||||
|
|
|
|||
|
|
@ -23,6 +23,13 @@
|
|||
<p class="x_help-block">{$lang->about_allowed_attach_size_global}<br />{sprintf($lang->about_allowed_size_limits, ini_get('upload_max_filesize'))}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label for="allowedFiletypes" class="x_control-label">{$lang->pre_conversion_filesize}</label>
|
||||
<div class="x_controls">
|
||||
<input type="number" min="0" name="pre_conversion_filesize" id="pre_conversion_filesize" value="{$config->pre_conversion_filesize ?? ''}" size="7" style="min-width:80px" /> MB
|
||||
<p class="x_help-block">{$lang->about_pre_conversion_filesize}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label for="allowedFiletypes" class="x_control-label">{$lang->allowed_filetypes}</label>
|
||||
<div class="x_controls">
|
||||
|
|
@ -276,6 +283,14 @@
|
|||
<p class="x_text-info" cond="!$is_exec_available">{$lang->msg_cannot_use_exec}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->ffmpeg_timeout}</label>
|
||||
<div class="x_controls">
|
||||
<input type="number" min="0" name="ffmpeg_timeout" value="{$config->ffmpeg_timeout}" style="min-width:80px" /> {$lang->unit_sec}
|
||||
<p class="x_help-block">{sprintf($lang->about_ffmpeg_timeout, ini_get('max_execution_time'))}</p>
|
||||
<p class="x_text-info" cond="!$is_exec_available">{$lang->msg_cannot_use_exec}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->magick_path}</label>
|
||||
<div class="x_controls">
|
||||
|
|
@ -284,6 +299,14 @@
|
|||
<p class="x_text-info" cond="!$is_exec_available">{$lang->msg_cannot_use_exec}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->magick_timeout}</label>
|
||||
<div class="x_controls">
|
||||
<input type="number" min="0" name="magick_timeout" value="{$config->magick_timeout}" style="min-width:80px" /> {$lang->unit_sec}
|
||||
<p class="x_help-block">{sprintf($lang->about_magick_timeout, ini_get('max_execution_time'))}</p>
|
||||
<p class="x_text-info" cond="!$is_exec_available">{$lang->msg_cannot_use_exec}</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="x_clearfix btnArea">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue