plus d'apercu pour les fichiers pdf (ref #121)
This commit is contained in:
parent
5f66580100
commit
e341a30f7f
|
@ -1454,7 +1454,7 @@ class PagewidgetController extends Controller
|
|||
foreach ($finder as $file) {
|
||||
$tmp=[];
|
||||
$tmp["name"]=$file->getRelativePathname();
|
||||
$tmp["extension"]=$file->getExtension();
|
||||
$tmp["extension"]=strtolower($file->getExtension());
|
||||
$fileinfo = new file($file->getPathname());
|
||||
$tmp["minetype"]=$fileinfo->getMimeType();
|
||||
$tmp["minefamily"]=explode("/",$tmp["minetype"])[0];
|
||||
|
@ -1463,6 +1463,7 @@ class PagewidgetController extends Controller
|
|||
if($tmp["extension"]=="pdf") {
|
||||
$tmp["thumb"]="/".$this->getParameter('alias')."/bundles/cadolescore/images/files/".$tmp["extension"].".png";
|
||||
|
||||
/* ne plus afficher l'apercu du pdf
|
||||
if($fs->exists($directory."/thumbmini/".$tmp["name"])) {
|
||||
$data = file_get_contents($directory."/thumbmini/".$tmp["name"]);
|
||||
$tmp["thumb"]="data:image/jpg;base64," . base64_encode($data);
|
||||
|
@ -1471,8 +1472,7 @@ class PagewidgetController extends Controller
|
|||
$data = file_get_contents($directory."/thumb/".$tmp["name"]);
|
||||
$tmp["thumb"]="data:image/jpg;base64," . base64_encode($data);
|
||||
}
|
||||
|
||||
|
||||
*/
|
||||
}
|
||||
elseif($fs->exists($directory."/thumbmini/".$tmp["name"])) {
|
||||
$data = file_get_contents($directory."/thumbmini/".$tmp["name"]);
|
||||
|
|
|
@ -231,7 +231,7 @@ class ProjecttaskController extends Controller
|
|||
foreach ($finder as $file) {
|
||||
$tmp=[];
|
||||
$tmp["name"]=$file->getRelativePathname();
|
||||
$tmp["extension"]=$file->getExtension();
|
||||
$tmp["extension"]=strtolower($file->getExtension());
|
||||
$fileinfo = new file($file->getPathname());
|
||||
$tmp["minetype"]=$fileinfo->getMimeType();
|
||||
$tmp["minefamily"]=explode("/",$tmp["minetype"])[0];
|
||||
|
@ -240,6 +240,7 @@ class ProjecttaskController extends Controller
|
|||
if($tmp["extension"]=="pdf") {
|
||||
$tmp["thumb"]="/".$this->getParameter('alias')."/bundles/cadolescore/images/files/".$tmp["extension"].".png";
|
||||
|
||||
/* ne plus afficher l'apercu du pdf
|
||||
if($fs->exists($directory."/thumbmini/".$tmp["name"])) {
|
||||
$data = file_get_contents($directory."/thumbmini/".$tmp["name"]);
|
||||
$tmp["thumb"]="data:image/jpg;base64," . base64_encode($data);
|
||||
|
@ -248,8 +249,7 @@ class ProjecttaskController extends Controller
|
|||
$data = file_get_contents($directory."/thumb/".$tmp["name"]);
|
||||
$tmp["thumb"]="data:image/jpg;base64," . base64_encode($data);
|
||||
}
|
||||
|
||||
|
||||
*/
|
||||
}
|
||||
elseif($fs->exists($directory."/thumbmini/".$tmp["name"])) {
|
||||
$data = file_get_contents($directory."/thumbmini/".$tmp["name"]);
|
||||
|
|
Loading…
Reference in New Issue