Ejemplo n.º 1
0
        // 检查文件是否存在
        public JsonResult CheckExists(List <FileHashInfo> hashlist)
        {
            FileSystemClient client = new FileSystemClient(AppConfig.FileSystem_AppID, AppConfig.FileSystem_AppSecret);

            string[] hashcodes = new string[hashlist.Count];
            int[]    sizes     = new int[hashlist.Count];
            for (int i = 0; i < hashlist.Count; i++)
            {
                var item = hashlist[i];
                hashcodes[i] = item.HashCode;
                sizes[i]     = item.Size;
            }
            return(Json(client.CheckFile(hashcodes, sizes)));
        }