if (checkBinaryExtensions(remoteFile)) {
log.debug("Transfer mode is set to Binary for a file upload");
ftpClient.setType(Session.TYPE_IMAGE);
}
ftpClient.put(remoteFile, new DataSourceStream(io), new MarkerListener() {
public void markerArrived(Marker marker) {
}
});
log.info("Upload file to:" + remoteFile + " is done");