Hi, I’m going to upload a image. I already doing same process but now i got the error warning Please let me know what is going wrong in my code
Here is div tag where front end code:
<?php echo $this->Form->control('file', ['type' => 'file',"class"=>"form-control" ]);?>
here is controller code :-
$gallery = $this->Galleries->newEntity($this->request->getData());
$uploaded_path = “/img/uploads/”;
$tmp_name = $this->request->data[‘file’][‘tmp_name’]; // this line got an error saying Undefined index: file
anyone can Please let me know.