/** * Override parent */ function handleFileUpload($fileParameters, $id) { $filename = $this->fileDefaultName; if (array_key_exists($this->parameterFile, $fileParameters) and array_key_exists('name', $fileParameters[$this->parameterFile]) and $fileParameters[$this->parameterFile]['name'] != '') { $imageHelper = new ImageHelper(); $filename = $imageHelper->upload($this->fileBasename, $id, $fileParameters[$this->parameterFile]); /*if ($filepath != "") { $imageHelper = new SimpleImage(); $imageHelper->load($filepath); $imageHelper->resize(100,100); $imageHelper->save('../img/news/News-".$id."100x100.png'); }*/ } return $filename; }
public function post_uploadPicture() { $uuid = Input::get("uuid"); $profile = Input::get("profile") ? 1 : 0; $this->file = Input::file("foto"); $image = new ImageHelper(); $userInfo = array("uuid" => $uuid, "profile" => $profile); $image->upload($this->file, "uploads/user/", $userInfo); if ($image) { return Redirect::to("/"); } }
public function post_uploadPicture() { $uuid = Input::get("uuid"); $own = Input::get("own"); $is_profile = Input::get("is_profile") ? Input::get("is_profile") : 0; $this->file = Input::file("foto"); $image = new ImageHelper(); $userInfo = array("uuid" => $uuid, "profile" => $is_profile); $image->upload($this->file, "uploads/pet/", $userInfo); if ($image) { return Redirect::to("/pet/mascota-profile/" . $own . "/" . $uuid); } }
/** * Override parent */ function handleFileUpload($fileParameters, $id) { $filename = $this->fileDefaultName; if (array_key_exists($this->parameterFile, $_FILES) and array_key_exists('name', $_FILES[$this->parameterFile]) and $_FILES[$this->parameterFile]['name'] != '') { $fileHelper = new ImageHelper(); $filename = $fileHelper->upload($this->fileBasename, $id, $_FILES[$this->parameterFile]); } return $filename; }