I am using apache’s FTP client to upload file to the ftp server. But the issue is there is no exception thrown from the code but the file uploaded is empty. What could be the reason for this.
I am uploading same file twice but with different name as below.
ftpClient.storeFile(fileDir+"//"+"actualFileName", inputStream));
ftpClient.storeFile(fileDir+"//"+"differentFileName", inputStream));
I assume it’s the second file that ends up empty. You should recreate the inputStream for the second update (per DRCB’s comment), otherwise it will be empty (it’ll have got used up by the first upload).