java - Android ftp4j - remote file size doesn't match local file size after upload success -


i got weird bug here. in order upload file ftp server imported ftp4j package in android app. problem whenever upload complete uploaded file size change, checked file content not match original content well. don't think caused internet problem accidentally, tested code 3 times , got same results, original file size 154266 in bytes , remote size became 201673 bytes every time upload completed.

here part of code.

client = new ftpclient(); client.upload(file, new mytransferlistener(file));  public class mytransferlistener implements ftpdatatransferlistener {     private file file;     private string filename;      public mytransferlistener(file file) {         this.file = file;         filename = file.getname();     }      ...      @override     public void completed() {         try {                 file.delete();             } catch (exception e) {}     }     ... } 

think uploading in text mode. try put client in binary transfer mode first.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -