Open marin-masic opened 1 year ago
I have same problem but when uploading big binary file (90 mb). After uploading I check md5 sum and every upload it is different. I changed transfer options to this dirty hack:
const chunkSize = 256 * 1024 * 1024;
const transferOptions = {
chunkSize,
step: (_total: number, nb: number, fsize: number): void => {
if (fsize > chunkSize) {
throw new Error(`file is too big: ${fsize}. Please increase chunk size`);
}
},
};
...
await con.putDirectory(buildDir, "/home/k/traktor", { transferOptions });
And now everything works as expected. It seems like chunked transfer is not working correctly. So this dirty hack disables it.
Hello. We are uploading XML file (around 2 MB) via FTP using
putFile
method, and sometimes XML file is malformed after upload. That kind of issue can happen when using ASCII transfer mode for non-ASCII files. Is it possible to set transfer mode when callingputFile
? Thank you!