mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-16 19:40:44 +01:00
parent
0db3ef43cd
commit
c83053b366
@ -33,6 +33,7 @@
|
|||||||
"ext-simplexml": "*",
|
"ext-simplexml": "*",
|
||||||
"ext-xsl": "*",
|
"ext-xsl": "*",
|
||||||
"ext-zip": "*",
|
"ext-zip": "*",
|
||||||
|
"ext-fileinfo": "*",
|
||||||
"aluguest/ical-easy-reader": "^1.5",
|
"aluguest/ical-easy-reader": "^1.5",
|
||||||
"danielstjules/stringy": "^3.1",
|
"danielstjules/stringy": "^3.1",
|
||||||
"davidepastore/codice-fiscale": "^0.4.0",
|
"davidepastore/codice-fiscale": "^0.4.0",
|
||||||
|
@ -17,7 +17,7 @@ $_SESSION['superselect']['id_categoria'] = $record['id_categoria'];
|
|||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
{[ "type": "image", "label": "<?php echo tr('Immagine'); ?>", "name": "immagine", "class": "img-thumbnail", "value": "<?php echo $articolo->image; ?>" ]}
|
{[ "type": "image", "label": "<?php echo tr('Immagine'); ?>", "name": "immagine", "class": "img-thumbnail", "value": "<?php echo $articolo->image; ?>", "accept": "image/x-png,image/gif,image/jpeg" ]}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
|
@ -241,6 +241,10 @@ class Upload extends Model
|
|||||||
|
|
||||||
$filepath = $upload->filepath;
|
$filepath = $upload->filepath;
|
||||||
|
|
||||||
|
if (!in_array(mime_content_type($filepath), ['image/x-png', 'image/gif', 'image/jpeg'])) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$driver = extension_loaded('gd') ? 'gd' : 'imagick';
|
$driver = extension_loaded('gd') ? 'gd' : 'imagick';
|
||||||
ImageManagerStatic::configure(['driver' => $driver]);
|
ImageManagerStatic::configure(['driver' => $driver]);
|
||||||
|
|
||||||
|
@ -406,6 +406,10 @@ class Uploads
|
|||||||
$fileinfo = self::fileInfo($filepath);
|
$fileinfo = self::fileInfo($filepath);
|
||||||
$directory = empty($directory) ? dirname($filepath) : $directory;
|
$directory = empty($directory) ? dirname($filepath) : $directory;
|
||||||
|
|
||||||
|
if (!in_array(mime_content_type($filepath), ['image/x-png', 'image/gif', 'image/jpeg'])) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$driver = extension_loaded('gd') ? 'gd' : 'imagick';
|
$driver = extension_loaded('gd') ? 'gd' : 'imagick';
|
||||||
Intervention\Image\ImageManagerStatic::configure(['driver' => $driver]);
|
Intervention\Image\ImageManagerStatic::configure(['driver' => $driver]);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user