original_string: 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();
      }
code: 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();
      }
code_tokens: 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 ( ) ; }
docstring: The main method, upload the file.
  
  @access public
  @param  UploadedFile $uploadedFile
  @param  string       $newFilename  (default: null)
  @param  string       $path         (default: null)
  @return array
docstring_tokens: The main method upload the file .