this is my save method to save a file to ftp server
public SFile save(SFile sFile) { try { this.createDirectories(sFile); String remote = "/home/ftp-user/documents/abc1234/Test.pdf"; ftpClient.storeFile(remote, sFile.getInputStreamFile()); return sFile; } catch (Exception e) { log.info("ftp save error = {}", e.getMessage()); return sFile; } }
the createDirectories function created the sub folder successfully. (checked using filezilla)e.g /home/ftp-user/documents/abc1234but the storeFile() doesn't store the file in the server. no exception is thrown either.