@Override
  public synchronized void upload(File fileToUpload, String filename,
      String contents, String comment) throws Exception {
    this.upload(new FileInputStream(fileToUpload), filename, contents, comment);
  }
@ Override public synchronized void upload ( File fileToUpload , String filename , String contents , String comment ) throws Exception { this . upload ( new FileInputStream ( fileToUpload ) , filename , contents , comment ) ; }
https://www.mediawiki.org/wiki/API:Upload