Ejemplo n.º 1
0
        string DoUpload(StorageNode node, string fileName)
        {
            // upload file
            string id = FastDFSClient.UploadFileByName(node, fileName);

            // set name as metadata
            Dictionary <string, string> metaData = new Dictionary <string, string>();

            metaData["filename"] = Path.GetFileNameWithoutExtension(fileName);
            FastDFSClient.SetMetaData(node, id, metaData);
            return(string.Format("{0}/{1}", node.GroupName, id));
        }