public async Task <ActionResult> LoadFromIGUsernames(string username) { if (String.IsNullOrEmpty(username)) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var mapPath = HttpContext.Server.MapPath("~/images"); int count = AppImageDownloader.BuildWithUsername(mapPath, username).Result; return(RedirectToAction("Report", new { c = count })); }
public async Task <ActionResult> LoadFromIGTags() { string tags = ConfigurationManager.AppSettings["IgTag"]; if (String.IsNullOrEmpty(tags)) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var mapPath = HttpContext.Server.MapPath("~/images"); await AppImageDownloader.BuildWithTags(mapPath, tags); return(RedirectToAction("InstagramImages")); }