コード例 #1
0
        public void FastDfsOperation(string groupName, string filePath, string fileExt)
        {
            var storageNode = FastDfsClient.GetStorageNode(groupName);
            var uploadFile  = File.ReadAllBytes(filePath);

            var fileName = _client.UploadFile(storageNode, uploadFile, fileExt);

            var downloadFile = _client.DownloadFile(storageNode, fileName);

            _client.RemoveFile(groupName, fileName);

            Assert.Equal(Md5Helper.Get32Md5(uploadFile), Md5Helper.Get32Md5(downloadFile));
        }
コード例 #2
0
 public void RemoveFile(string dfsFileName)
 {
     _repository?.DeleteByDfsFileName(dfsFileName);
     _fastDfsClient.RemoveFile(_groupName, dfsFileName);
 }
コード例 #3
0
 public void RemoveFile(string fileKey)
 {
     client.RemoveFile(storageNode.GroupName, fileKey);
 }