public ArtistController() { services = new GoogleDriveServices(HttpContext.Current.Server.MapPath("~/")); dto = new ArtistDTO(HttpContext.Current.Request.Url); albumDto = new AlbumDTO(HttpContext.Current.Request.Url); songDto = new SongDTO(HttpContext.Current.Request.Url); }
public UsersController() { services = new GoogleDriveServices(HttpContext.Current.Server.MapPath("~/")); Uri uri = HttpContext.Current.Request.Url; dto = new UserInfoDTO(uri); playlistDto = new PlaylistDTO(uri); songDto = new SongDTO(uri); }
public SongController() { services = new GoogleDriveServices(HttpContext.Current.Server.MapPath("~/")); Uri uri = HttpContext.Current.Request.Url; dto = new SongDTO(uri); commentDto = new CommentDTO(uri); rankingSongDto = new RankingSongDTO(uri); }
public void DownloadFile(string id) { string FilePath = GoogleDriveServices.DownloadGoogleFile(id, Server.MapPath("~/drive-client.json")); Response.ContentType = "application/zip"; Response.AddHeader("Content-Disposition", "attachment; filename=" + Path.GetFileName(FilePath)); Response.WriteFile(@"D:\DriveFiles\" + Path.GetFileName(FilePath)); Response.End(); Response.Flush(); }
public ActionResult UploadFile(HttpPostedFileBase file) { GoogleDriveServices.FileUpload(file, Server.MapPath("~/drive-client.json")); return(RedirectToAction("GetGoogleDriveFiles")); }
public ActionResult DeleteFile(GoogleDriveFile file) { GoogleDriveServices.DeleteFile(file, Server.MapPath("~/drive-client.json")); return(RedirectToAction("GetGoogleDriveFiles")); }
public ActionResult GetGoogleDriveFiles() { return(View(GoogleDriveServices.GetDriveFiles(Server.MapPath("~/drive-client.json")))); }
public ResourceController() { services = new GoogleDriveServices(HttpContext.Current.Server.MapPath("~/")); }