Esempio n. 1
0
        private void InitDropbox()
        {
            dbBase = new DropBoxBase("o9340xsv2mzn7ws", "xzky2fzfnmssik1");
            var url   = dbBase.GeneratedAuthenticationURL();
            var token = dbBase.GenerateAccessToken();

            imgRepo = new ImagesRepository(conn);
        }
Esempio n. 2
0
        public async void TestDropBox()
        {
            InitDropbox();
            var imgRepo = new ImagesRepository(conn);
            var url     = dbBase.GeneratedAuthenticationURL();
            var token   = dbBase.GenerateAccessToken();
            var image   = await dbBase.Upload("/Dropbox/DotNetApi/products", "туфли.png",
                                              @"D:\Projects\prom\SmartRetail.Mvc\SmartRetail.App.Web\pic\туфли.jpg");

            var img = new Image
            {
                prod_id  = 1,
                img_name = "shoes",
                img_type = "jpg",
                img_url  = image
            };

            Thread.Sleep(500);
            imgRepo.Add(img);
        }