Gallery : upload par ftp, dossier miniature non créé.

This commit is contained in:
Fred Tempez 2020-04-11 14:33:10 +02:00
parent 72d5f46353
commit 6eb697e427

View File

@ -794,8 +794,12 @@ class common {
*/
function makeThumb($src, $dest, $desired_width) {
// Vérifier l'existence du dossier de destination.
$path = pathinfo($dest);
if (!is_dir($path['dirname'])) {
mkdir($path['dirname']);
}
// Image jpeg
if (mime_content_type($src) === 'image/jpeg' ) {
if ($source_image = imagecreatefromjpeg($src)) {
$width = imagesx($source_image);
@ -811,6 +815,7 @@ class common {
}
}
// image png
if ( mime_content_type($src) === 'image/png' ) {
/* read the source image */
if ($source_image = imagecreatefrompng($src)) {;