app/Controller/BannerController.php 1 location
|
@@ 63-70 (lines=8) @@
|
| 60 |
|
|
| 61 |
|
$image = $_FILES['imagem']; |
| 62 |
|
|
| 63 |
|
if (!empty($image['name'])) { |
| 64 |
|
$retorno = $this->uploadImage($image); |
| 65 |
|
|
| 66 |
|
if (!$retorno['status']) |
| 67 |
|
$this->Session->setFlash('Não foi possivel salvar a imagem tente novamente'); |
| 68 |
|
|
| 69 |
|
$dados['imagem'] = $retorno['nome']; |
| 70 |
|
} |
| 71 |
|
|
| 72 |
|
|
| 73 |
|
$dados['id_usuario'] = $this->instancia; |
app/Controller/ProdutoController.php 1 location
|
@@ 115-122 (lines=8) @@
|
| 112 |
|
|
| 113 |
|
$image = $_FILES['imagem']; |
| 114 |
|
|
| 115 |
|
if (!empty($image['name'])) { |
| 116 |
|
$retorno = $this->uploadImage($image); |
| 117 |
|
|
| 118 |
|
if (!$retorno['status']) |
| 119 |
|
$this->Session->setFlash('Não foi possivel salvar a imagem tente novamente'); |
| 120 |
|
|
| 121 |
|
$dados['imagem'] = $retorno['nome']; |
| 122 |
|
} |
| 123 |
|
|
| 124 |
|
|
| 125 |
|
$dados['id_usuario'] = $this->instancia; |