Exemplo n.º 1
0
        public void TestMethod1()
        {
            var filepath =
                @"E:\Github\zbw911\Dev.All\DevLibs\Framework\FileServer\Kt.Framework.FileServer.Test\TestLocalUploadFile.cs";
            var x = new ReadConfig("TestLocalUploadFile.config");
            IKey key = new LocalFileKey();
            IUploadFile upload = new LocalUploadFile(key);

            var filekey = "1-2013-12-02-05e89032842c22cc4cb13f07e1173333.cs";
            //var filekey = key.CreateFileKey(filepath);


            Console.WriteLine(filekey);


            var s = key.GetFileSavePath(filekey);


            Console.WriteLine(s);


            Console.WriteLine(Dev.Comm.JsonConvert.ToJsonStr(s));


            var uploadedkey = upload.SaveFile(File.OpenRead(filepath), filekey);

        }
Exemplo n.º 2
0
        public void TestMethod1()
        {
            var filepath =
                @"C:\Users\Administrator\Source\Repos\Dev.All\DevLibs\Framework\FileServer\Kt.Framework.FileServer.Test\TestLocalUploadFile.cs";
            var x = new ReadConfig("TestLocalUploadFile.config");
            IKey key = new LocalFileKey();
            IUploadFile upload = new LocalUploadFile(key);

            var filekey = key.CreateFileKey(filepath);


            Console.WriteLine(filekey);


            var s = key.GetFileSavePath(filekey);


            Console.WriteLine(s);


            Console.WriteLine(Dev.Comm.JsonConvert.ToJsonStr(s));


            var uploadedkey = upload.SaveFile(File.OpenRead(filepath), filekey);

            //upload.SaveFile(File.OpenRead(".."), filekey);

           



        }