| Línea 905... |
Línea 905... |
| 905 |
'success' => false,
|
905 |
'success' => false,
|
| 906 |
'data' => 'ERROR_UPLOAD_FILE'
|
906 |
'data' => 'ERROR_UPLOAD_FILE'
|
| 907 |
]);
|
907 |
]);
|
| 908 |
}
|
908 |
}
|
| Línea 909... |
Línea 909... |
| 909 |
|
909 |
|
| 910 |
// Obtener dimensiones objetivo para el redimensionamiento
|
910 |
/* // Obtener dimensiones objetivo para el redimensionamiento
|
| 911 |
list($target_width_str, $target_height_str) = explode('x', $this->config['leaderslinked.image_sizes.company_image_size']);
|
911 |
list($target_width_str, $target_height_str) = explode('x', $this->config['leaderslinked.image_sizes.company_image_size']);
|
| 912 |
$target_width = (int)$target_width_str;
|
912 |
$target_width = (int)$target_width_str;
|
| Línea 913... |
Línea 913... |
| 913 |
$target_height = (int)$target_height_str;
|
913 |
$target_height = (int)$target_height_str; */
|
| 914 |
|
914 |
|
| 915 |
// Generar nombres de archivo únicos
|
915 |
// Generar nombres de archivo únicos
|
| 916 |
$source = $storage->getTmpFilename();
|
916 |
$source = $storage->getTmpFilename();
|
| Línea 917... |
Línea 917... |
| 917 |
$filename = 'company-image-' . $company->uuid . '.png';
|
917 |
$filename = 'company-image-' . $company->uuid . '.png';
|
| 918 |
$target_filename = $storage->composePathToFilename(Storage::TYPE_COMPANY, $company->uuid, $filename);
|
918 |
$target_filename = $storage->composePathToFilename(Storage::TYPE_COMPANY, $company->uuid, $filename);
|
| 919 |
|
919 |
|
| 920 |
// Subir y redimensionar la imagen
|
920 |
// Subir y redimensionar la imagen
|
| Línea 921... |
Línea 921... |
| 921 |
if (!$storage->uploadImageResize($source, $target_filename, $target_width, $target_height)) {
|
921 |
if (!$storage->uploadImageWithOutChangeSize($source, $target_filename)) {
|
| 922 |
return $this->_createSimpleErrorResponse('ERROR_THERE_WAS_AN_ERROR');
|
922 |
return $this->_createSimpleErrorResponse('ERROR_THERE_WAS_AN_ERROR');
|