You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I added shell_exec in PHP. When I run:
sudo -u www /usr/bin/ffmpeg -ss 3 -i /home/fullpriceexit/vendor/studio-42/elfinder/files/Videos/sample.mp4 -vframes 1 -update 1 -f image2 /home/fullpriceexit/vendor/studio-42/elfinder/files/.tmb/test.png
It creates a thumbnail. I think my connector is set up right, and it creates other thumbnails, just not video thumbnails. Any idea what else to try?
`<?php
error_reporting(0); // Set E_ALL for debugging
define('ELFINDER_FFMPEG_PATH', '/usr/bin/ffmpeg'); // enable if ffmpeg installed
define('ELFINDER_IMAGEMAGICK_PS', true);
is_readable('./vendor/autoload.php') && require './vendor/autoload.php';
require './autoload.php';
elFinder::$netDrivers['ftp'] = 'FTP';
function access($attr, $path, $data, $volume, $isDir, $relpath) {
$basename = basename($path);
return $basename[0] === '.' && strlen($relpath) !== 1
? !($attr == 'read' || $attr == 'write')
: null;
}
$videoTypes = array(
'video', // wildcard for all video/*
'video/mp4',
'video/webm',
'video/ogg',
'video/quicktime',
'video/x-msvideo',
'video/x-matroska',
'application/mp4',
'application/octet-stream' // fallback if MIME misreported
);
$allowList = array_merge(
array(
// images
'image',
// text/docs
'text/plain',
'application/pdf'
),
$videoTypes
);
$opts = array(
'debug' => true,
'roots' => array(
array(
'driver' => 'LocalFileSystem',
'path' => '/home/fullpriceexit/vendor/studio-42/elfinder/files',
'URL' => '/files',
'trashHash' => 't1_Lw',
'winHashFix' => DIRECTORY_SEPARATOR !== '/',
'uploadDeny' => array('all'),
'uploadAllow' => $allowList,
'uploadOrder' => array('deny', 'allow'),
'accessControl' => 'access',
'imgLib' => 'gd',
'tmbPath' => '../files/.tmb',
'tmbURL' => dirname($_SERVER['PHP_SELF']) . '/../files/.tmb/',
'tmbGcMaxlifeHour' => 2160,
'tmbGcPercentage' => 5,
);
$connector = new elFinderConnector(new elFinder($opts));
$connector->run();
?>`
Beta Was this translation helpful? Give feedback.
All reactions