Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 17002 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 17002 Rev 17018
Línea 909... Línea 909...
909
                    $source             = $files['image']['tmp_name'];
909
                    $source             = $files['image']['tmp_name'];
910
                    $target_filename    = 'company-image-' . uniqid() . '.png';
910
                    $target_filename    = 'company-image-' . uniqid() . '.png';
911
                    $crop_to_dimensions = true;
911
                    $crop_to_dimensions = true;
912
                    $unlink_source = false;
912
                    $unlink_source = false;
Línea 913... Línea 913...
913
 
913
 
914
                    if(!$image->uploadImageChangeSize($source, $target_company_path, $company->uuid, $target_filename, $target_width, $target_height, $crop_to_dimensions, $unlink_source)) {
914
                    if(!$image->uploadProcessChangeSize($source, $target_company_path, $company->uuid, $target_filename, $target_width, $target_height, $crop_to_dimensions, $unlink_source)) {
915
                        return new JsonModel([
915
                        return new JsonModel([
916
                            'success'   => false,
916
                            'success'   => false,
917
                            'data'   =>  'ERROR_THERE_WAS_AN_ERROR'
917
                            'data'   =>  'ERROR_THERE_WAS_AN_ERROR'
918
                        ]);
918
                        ]);
Línea 943... Línea 943...
943
                            $source             = $files['image']['tmp_name'];
943
                            $source             = $files['image']['tmp_name'];
944
                            $target_filename    = 'user-image-' . uniqid() . '.png';
944
                            $target_filename    = 'user-image-' . uniqid() . '.png';
945
                            $crop_to_dimensions = true;
945
                            $crop_to_dimensions = true;
946
                            $unlink_source = true;
946
                            $unlink_source = true;
Línea 947... Línea 947...
947
                            
947
                            
948
                            if(!$image->uploadImageChangeSize($source, $target_company_path, $company->uuid, $target_filename, $target_width, $target_height, $crop_to_dimensions, $unlink_source)) {
948
                            if(!$image->uploadProcessChangeSize($source, $target_company_path, $company->uuid, $target_filename, $target_width, $target_height, $crop_to_dimensions, $unlink_source)) {
949
                                return new JsonModel([
949
                                return new JsonModel([
950
                                    'success'   => false,
950
                                    'success'   => false,
951
                                    'data'   =>  'ERROR_THERE_WAS_AN_ERROR'
951
                                    'data'   =>  'ERROR_THERE_WAS_AN_ERROR'
952
                                ]);
952
                                ]);
Línea 985... Línea 985...
985
                        'data'   => $messages
985
                        'data'   => $messages
986
                    ]);
986
                    ]);
987
                }
987
                }
988
            }
988
            }
Línea 989... Línea 989...
989
            
989
            
Línea 990... Línea 990...
990
            $storage = Storage::getInstance($this->config);
990
            $storage = Storage::getInstance($this->config, $this->adapter);
991
            
991
            
992
            return new JsonModel([
992
            return new JsonModel([
Línea 1087... Línea 1087...
1087
                    $source             = $files['cover']['tmp_name'];
1087
                    $source             = $files['cover']['tmp_name'];
1088
                    $target_filename    = 'company-cover-' . uniqid() . '.png';
1088
                    $target_filename    = 'company-cover-' . uniqid() . '.png';
1089
                    $crop_to_dimensions = false;
1089
                    $crop_to_dimensions = false;
1090
                    $unlink_source = true;
1090
                    $unlink_source = true;
Línea 1091... Línea 1091...
1091
                    
1091
                    
1092
                    if($image->uploadImageChangeSize($source, $target_path, $company->uuid, $target_filename, $target_width, $target_height, $crop_to_dimensions, $unlink_source)) {
1092
                    if($image->uploadProcessChangeSize($source, $target_path, $company->uuid, $target_filename, $target_width, $target_height, $crop_to_dimensions, $unlink_source)) {
1093
                        return new JsonModel([
1093
                        return new JsonModel([
1094
                            'success'   => false,
1094
                            'success'   => false,
1095
                            'data'   =>  'ERROR_THERE_WAS_AN_ERROR'
1095
                            'data'   =>  'ERROR_THERE_WAS_AN_ERROR'
1096
                        ]);
1096
                        ]);
Línea 1121... Línea 1121...
1121
                        'data'   => $messages
1121
                        'data'   => $messages
1122
                    ]);
1122
                    ]);
1123
                }
1123
                }
1124
            }
1124
            }
Línea 1125... Línea 1125...
1125
            
1125
            
Línea 1126... Línea 1126...
1126
            $storage = Storage::getInstance($this->config);
1126
            $storage = Storage::getInstance($this->config, $this->adapter);
1127
            
1127
            
1128
            
1128
            
Línea 1223... Línea 1223...
1223
                    $source             = $files['header']['tmp_name'];
1223
                    $source             = $files['header']['tmp_name'];
1224
                    $target_filename    = 'company-header-' . uniqid() . '.png';
1224
                    $target_filename    = 'company-header-' . uniqid() . '.png';
1225
                    $crop_to_dimensions = false;
1225
                    $crop_to_dimensions = false;
1226
                    $unlink_source = true;
1226
                    $unlink_source = true;
Línea 1227... Línea 1227...
1227
                    
1227
                    
1228
                    if($image->uploadImageChangeSize($source, $target_path, $company->uuid, $target_filename, $target_width, $target_height, $crop_to_dimensions, $unlink_source)) {
1228
                    if($image->uploadProcessChangeSize($source, $target_path, $company->uuid, $target_filename, $target_width, $target_height, $crop_to_dimensions, $unlink_source)) {
1229
                        return new JsonModel([
1229
                        return new JsonModel([
1230
                            'success'   => false,
1230
                            'success'   => false,
1231
                            'data'   =>  'ERROR_THERE_WAS_AN_ERROR'
1231
                            'data'   =>  'ERROR_THERE_WAS_AN_ERROR'
1232
                        ]);
1232
                        ]);
Línea 1255... Línea 1255...
1255
                        'data'   => $messages
1255
                        'data'   => $messages
1256
                    ]);
1256
                    ]);
1257
                }
1257
                }
1258
            }
1258
            }
Línea 1259... Línea 1259...
1259
            
1259
            
1260
            $storage = Storage::getInstance($this->config);
1260
            $storage = Storage::getInstance($this->config, $this->adapter);
Línea 1261... Línea 1261...
1261
            $path = $storage->getPathCompany();
1261
            $path = $storage->getPathCompany();
1262
            
1262
            
1263
            return new JsonModel([
1263
            return new JsonModel([
Línea 1356... Línea 1356...
1356
                    $source             = $files['footer']['tmp_name'];
1356
                    $source             = $files['footer']['tmp_name'];
1357
                    $target_filename    = 'company-footer-' . uniqid() . '.png';
1357
                    $target_filename    = 'company-footer-' . uniqid() . '.png';
1358
                    $crop_to_dimensions = false;
1358
                    $crop_to_dimensions = false;
1359
                    $unlink_source = true;
1359
                    $unlink_source = true;
Línea 1360... Línea 1360...
1360
                    
1360
                    
1361
                    if($image->uploadImageChangeSize($source, $target_path, $company->uuid, $target_filename, $target_width, $target_height, $crop_to_dimensions, $unlink_source)) { 
1361
                    if($image->uploadProcessChangeSize($source, $target_path, $company->uuid, $target_filename, $target_width, $target_height, $crop_to_dimensions, $unlink_source)) { 
1362
                        return new JsonModel([
1362
                        return new JsonModel([
1363
                            'success'   => false,
1363
                            'success'   => false,
1364
                            'data'   =>  'ERROR_THERE_WAS_AN_ERROR'
1364
                            'data'   =>  'ERROR_THERE_WAS_AN_ERROR'
1365
                        ]);
1365
                        ]);
Línea 1390... Línea 1390...
1390
                        'data'   => $messages
1390
                        'data'   => $messages
1391
                    ]);
1391
                    ]);
1392
                }
1392
                }
1393
            }
1393
            }
Línea 1394... Línea 1394...
1394
            
1394
            
1395
            $storage = Storage::getInstance($this->config);
1395
            $storage = Storage::getInstance($this->config, $this->adapter);
Línea 1396... Línea 1396...
1396
            $path = $storage->getPathCompany();
1396
            $path = $storage->getPathCompany();
1397
            
1397
            
1398
            return new JsonModel([
1398
            return new JsonModel([