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 TestDeletePath()
        {
            var         skey   = "1-2013-12-02-05e89032842c22cc4cb13f07e1173333.cs";
            var         x      = new ReadConfig("TestLocalUploadFile.config");
            IKey        key    = new LocalFileKey();
            IUploadFile upload = new LocalUploadFile(key);

            upload.DeltePath(skey);
        }
Exemplo n.º 3
0
        public void TestFileUrl()
        {
            var         skey   = "1-2013-12-02-05e89032842c22cc4cb13f07e1173333.cs";
            var         x      = new ReadConfig("TestLocalUploadFile.config");
            IKey        key    = new LocalFileKey();
            IUploadFile upload = new LocalUploadFile(key);

            var url = key.GetFileUrl(skey);
        }
Exemplo n.º 4
0
        public void TestLocalKey()
        {
            var  x   = new ReadConfig("TestLocalUploadFile.config");
            IKey key = new LocalFileKey();
            //var fkey = key.CreateFileKey("filename.cs");
            var fkey = "1-2013-12-02-0a499429af636838f06bbc2af31b65e8.cs";// key.CreateFileKey("filename.cs");


            TestValue(key, fkey);
        }
Exemplo n.º 5
0
        public void CreateNoExtKey()
        {
            var  x   = new ReadConfig("TestLocalUploadFile.config");
            IKey key = new LocalFileKey();
            //var fkey = key.CreateFileKey("filename.cs");
            var fkey = "1-2013-12-02-0a499429af636838f06bbc2af31b65e8";// key.CreateFileKey("filename.cs");

            var strkey = key.CreateFileKey(fkey);

            Console.WriteLine(strkey);
        }