WikiFile::uploadData PHP Method

uploadData() public method

$text is only used for the page contents of a new file, not an existing one (update that via WikiPage::setText()). If no $text is specified, $comment will be used as new page text.
public uploadData ( string $data, string $comment, string $text = null, boolean $overwrite = false ) : boolean
$data string The data to upload
$comment string Upload comment for the file
$text string The article text for the file page
$overwrite boolean True to overwrite existing file
return boolean True if uploading was successful
    public function uploadData($data, $comment, $text = null, $overwrite = false)
    {
        // Collect upload parameter
        $params = array('file' => $data);
        // Upload contents to current file
        return $this->uploadCommon($params, $comment, $text, $overwrite);
    }