file-transfer

Binary file transfer over Socket using TCP

不羁岁月 提交于 2021-02-08 03:48:56
问题 I am working on a binary file transfer program in which the client has to upload a file to server. For this case, I need to send the file name first and file content second. But this is not feasible for me. Lets see the code: // Client-side code to send file name void sendFileName( int sd, /*Socket Descriptor*/ char *fname) /*Array Containing the file name */ { int n , byteswritten=0 , written ; char buffer[1024]; strcpy(buffer , fname); n=strlen(buffer); while (byteswritten<n) { written

Files are getting corrupted when download using ftp in java [duplicate]

雨燕双飞 提交于 2021-01-28 17:51:56
问题 This question already has answers here : FTP zip upload is corrupted sometimes (2 answers) Closed 2 years ago . Files are getting corrupted when I am trying to pull a compressed files. Here is the code I have used. I am not able to understand what I am going wrong. The format of files is .zip and inside it has XML files. After downloading it from remote server,XML files tags are changed and looks corrupted. public Boolean pullConfirmationsFTP(String host, String sftpUserName, String sftpPwd,

Files are getting corrupted when download using ftp in java [duplicate]

╄→尐↘猪︶ㄣ 提交于 2021-01-28 17:48:36
问题 This question already has answers here : FTP zip upload is corrupted sometimes (2 answers) Closed 2 years ago . Files are getting corrupted when I am trying to pull a compressed files. Here is the code I have used. I am not able to understand what I am going wrong. The format of files is .zip and inside it has XML files. After downloading it from remote server,XML files tags are changed and looks corrupted. public Boolean pullConfirmationsFTP(String host, String sftpUserName, String sftpPwd,

how to merge chunks of file (result of html5 chunking) into one file fast and efficient

喜夏-厌秋 提交于 2021-01-27 18:58:28
问题 I create a file transfer program which upload files (huge file about 4gb) using html5 chunking. each chunk is sized of 100MB (I just choose this for no reason, as I try use 10MB, it does not really have any difference as far as I can tell). It upload correctly each chunk. but at the end of finish uploading, I try to merge the file back into 1 piece, but it takes so much time. If I try to refresh the web ui for the uploader, it won't work until it finish merging. my merge code something like

How to prevent my app from hanging when parallelising paramiko.SFTPClient.get requests?

心已入冬 提交于 2021-01-01 09:11:36
问题 I am trying to parallelise retrieval of files from a server via SFTP and upload to AWS. I am using python multi-threading, the upload part works fine, however, I noticed that the get operation from paramiko.SFTPClient keeps the program hanging at the end. In fact, all of the files are withdrawn and uploaded but the program doesn't exit. I tried many things from similar posts but nothing work, my pseudo-code is the following, any help would be welcome: def create_sftp_connection(host, port,

How to prevent my app from hanging when parallelising paramiko.SFTPClient.get requests?

最后都变了- 提交于 2021-01-01 09:08:49
问题 I am trying to parallelise retrieval of files from a server via SFTP and upload to AWS. I am using python multi-threading, the upload part works fine, however, I noticed that the get operation from paramiko.SFTPClient keeps the program hanging at the end. In fact, all of the files are withdrawn and uploaded but the program doesn't exit. I tried many things from similar posts but nothing work, my pseudo-code is the following, any help would be welcome: def create_sftp_connection(host, port,

How to prevent my app from hanging when parallelising paramiko.SFTPClient.get requests?

最后都变了- 提交于 2021-01-01 09:04:53
问题 I am trying to parallelise retrieval of files from a server via SFTP and upload to AWS. I am using python multi-threading, the upload part works fine, however, I noticed that the get operation from paramiko.SFTPClient keeps the program hanging at the end. In fact, all of the files are withdrawn and uploaded but the program doesn't exit. I tried many things from similar posts but nothing work, my pseudo-code is the following, any help would be welcome: def create_sftp_connection(host, port,