public function upload(UploadedFile $uploadedFile, $newFilename = null, $path = null)
    {
        $this->prepareTargetUploadPath($path);

        $this->getUploadedOriginalFileProperties($uploadedFile);

        $this->setNewFilename($newFilename);

        $this->saveOriginalFile($uploadedFile);

        $this->createThumbnails($uploadedFile);

        return $this->returnOutput();
    }
public function upload(UploadedFile $uploadedFile, $newFilename = null, $path = null)
    {
        $this->prepareTargetUploadPath($path);

        $this->getUploadedOriginalFileProperties($uploadedFile);

        $this->setNewFilename($newFilename);

        $this->saveOriginalFile($uploadedFile);

        $this->createThumbnails($uploadedFile);

        return $this->returnOutput();
    }
public function upload ( UploadedFile $ uploadedFile , $ newFilename = null , $ path = null ) { $ this -> prepareTargetUploadPath ( $ path ) ; $ this -> getUploadedOriginalFileProperties ( $ uploadedFile ) ; $ this -> setNewFilename ( $ newFilename ) ; $ this -> saveOriginalFile ( $ uploadedFile ) ; $ this -> createThumbnails ( $ uploadedFile ) ; return $ this -> returnOutput ( ) ; }
The main method, upload the file.

@access public
@param  UploadedFile $uploadedFile
@param  string       $newFilename  (default: null)
@param  string       $path         (default: null)
@return array
The main method upload the file .