Ejemplo n.º 1
0
        public ActionResult DriveSelect()
        {
            if (Request.IsAuthenticated)
            {
                APIManager drive = new APIManager(Session["USER"].ToString());
                IDriveItemChildrenCollectionPage driveItems = Task.Run(() => drive.GetDriveItems(HttpContext)).Result;

                DBManager db  = new DBManager();
                string    dir = db.GetUserUploadDirectory(Session["USER"].ToString());

                ViewBag.Dir       = dir;
                ViewBag.DriveList = driveItems;
                return(View());
            }
            else
            {
                return(RedirectToAction("SignOut", "Home", null));
            }
        }