I am trying to upload file using SFTP. file size is Maximum 1 - 10 MB.
i could not upload the file if more then 32KB.
if file size more the KB then it is going the loop in else part.
if (bytesRead < this.BufferSize)
var data = new byte[bytesRead];
Array.Copy(buffer, data, bytesRead);
this._sftpSession.RequestWrite(handle, offset, data);
uploadCompleted = true;
this._sftpSession.RequestWrite(handle, offset, buffer);
But keep on waiting for the response. finally i wait till 1 and 1/2 hours also to leave the upload.. there is no reponse from server.
i think no data is writing in to the server. if i tried 12 and 25 KB files it is successfully writing the files.
Where i need to change the code to upload 1 mb file. to get response from server.
i tried changes for on code
MAXIMUM_PACKET_SIZE = 150000;
MAXIMUM_PAYLOAD_SIZE = 10241 * 32;
I am not able to success to upload the files. :(
Could you please let me know what are the changes required in a code to upload the file size 1- 10 mb files.