Nette\Http\FileUpload::isOk PHP Method

isOk() public method

Is there any error?
public isOk ( ) : boolean
return boolean
    public function isOk()
    {
        return $this->error === UPLOAD_ERR_OK;
    }

Usage Example

Beispiel #1
0
 /**
  * @param FileUpload $fileUpload
  */
 public function upload(FileUpload $fileUpload, $path)
 {
     if (!$fileUpload->isOk()) {
         throw new ImageUploadedException('Chyba při nahrávání obrázku');
     }
     $fileUpload->move($path);
 }
All Usage Examples Of Nette\Http\FileUpload::isOk