| Línea 413... |
Línea 413... |
| 413 |
if (isset($files['image']) && empty($files['image']['error'])) {
|
413 |
if (isset($files['image']) && empty($files['image']['error'])) {
|
| 414 |
$tmp_filename = $files['image']['tmp_name'];
|
414 |
$tmp_filename = $files['image']['tmp_name'];
|
| 415 |
$filename = explode('.', $files['image']['name']);
|
415 |
$filename = explode('.', $files['image']['name']);
|
| 416 |
$filename = Functions::normalizeString(uniqid() . '-' . $filename[0] . '.png');
|
416 |
$filename = Functions::normalizeString(uniqid() . '-' . $filename[0] . '.png');
|
| Línea 417... |
Línea 417... |
| 417 |
|
417 |
|
| Línea 418... |
Línea -... |
| 418 |
$crop_to_dimensions = true;
|
- |
|
| - |
|
418 |
//$crop_to_dimensions = true;
|
| 419 |
|
419 |
|
| 420 |
|
420 |
if(Image::uploadFile($tmp_filename, $target_path, $filename)) {
|
| 421 |
if (Image::uploadImage($tmp_filename, $target_path, $filename, $target_width, $target_height, $crop_to_dimensions)) {
|
421 |
// if (Image::uploadImage($tmp_filename, $target_path, $filename, $target_width, $target_height, $crop_to_dimensions)) {
|
| 422 |
$knowledgeAreaContent->image = $filename;
|
422 |
$knowledgeAreaContent->image = $filename;
|
| 423 |
$knowledgeAreaContentMapper->update($knowledgeAreaContent);
|
423 |
$knowledgeAreaContentMapper->update($knowledgeAreaContent);
|
| Línea 703... |
Línea 703... |
| 703 |
|
703 |
|
| 704 |
$tmp_filename = $files['image']['tmp_name'];
|
704 |
$tmp_filename = $files['image']['tmp_name'];
|
| 705 |
$filename = explode('.', $files['image']['name']);
|
705 |
$filename = explode('.', $files['image']['name']);
|
| Línea 706... |
Línea 706... |
| 706 |
$filename = Functions::normalizeString(uniqid() . '-' . $filename[0] . '.png');
|
706 |
$filename = Functions::normalizeString(uniqid() . '-' . $filename[0] . '.png');
|
| 707 |
|
- |
|
| Línea -... |
Línea 707... |
| - |
|
707 |
|
| 708 |
$crop_to_dimensions = true;
|
708 |
// $crop_to_dimensions = true;
|
| 709 |
|
709 |
|
| 710 |
|
710 |
if(Image::uploadFile($tmp_filename, $target_path, $filename)) {
|
| 711 |
if (Image::uploadImage($tmp_filename, $target_path, $filename, $target_width, $target_height, $crop_to_dimensions)) {
|
711 |
// if (Image::uploadImage($tmp_filename, $target_path, $filename, $target_width, $target_height, $crop_to_dimensions)) {
|
| 712 |
$knowledgeAreaContent->image = $filename;
|
712 |
$knowledgeAreaContent->image = $filename;
|