Closed andy65007 closed 5 years ago
你可以手动调fastdfsclient 上传试下
手动调?啥意思?
下面代码有问题吗?
`List
string fileName = "test.txt"; string path = Path.Combine("D:\", fileName);
StorageNode node = FastDFSClient.GetStorageNodeAsync().GetAwaiter().GetResult(); string s = FastDFSClient.UploadFileAsync(node, new MemoryStream(File.ReadAllBytes(path)), "txt").GetAwaiter().GetResult();;
Console.WriteLine(s);
byte[] fileData = FastDFSClient.DownloadFileAsync(node, s).GetAwaiter().GetResult(); Console.WriteLine("length:" + fileData.Length);
File.WriteAllBytes("D:\123.txt", fileData);
`
please use
Task DownloadFileAsync(StorageNode storageNode, string fileName,
IDownloadCallback downloadCallback,
long offset = 0,
long length = 0)
i will fix return byte array bug
@andy65007 fixed in 1.2.4 , suggest use stream for big file.
good!
调用库后,改变了原有文件内容,不太好啊