code: private AFTPClient actionPutFile() throws IOException, PageException {
  	required("remotefile", remotefile);
  	required("localfile", localfile);
  
  	AFTPClient client = getClient();
  	Resource local = ResourceUtil.toResourceExisting(pageContext, localfile);// new File(localfile);
  	// if(failifexists && local.exists()) throw new ApplicationException("File ["+local+"] already
  	// exist, if you want to overwrite, set attribute
  	// failIfExists to false");
  	InputStream is = null;
  
  	try {
  	    is = IOUtil.toBufferedInputStream(local.getInputStream());
  	    client.setFileType(getType(local));
  	    client.storeFile(remotefile, is);
  	}
  	finally {
  	    IOUtil.closeEL(is);
  	}
  	writeCfftp(client);
  
  	return client;
      }
docs: copy a local file to server
  
  @return FTPClient
  @throws IOException
  @throws PageException