/// <summary> /// Download File /// </summary> /// <param name="url">URL</param> /// <param name="applicationName">application Name</param> /// <returns>Byte Array</returns> public byte[] DownloadFile(string url, string applicationName) { BELDataAccessLayer helper = new BELDataAccessLayer(); ////string siteURL = helper.GetSiteURL(applicationName); ////context = helper.CreateClientContext(siteURL); return(helper.GetFileBytesByUrl(this.context, url)); }
/// <summary> /// Download File /// </summary> /// <param name="url">URL</param> /// <param name="applicationName">application Name</param> /// <returns>Byte Array</returns> public byte[] DownloadFile(string url, string applicationName) { BELDataAccessLayer helper = new BELDataAccessLayer(); ////string siteURL = helper.GetSiteURL(applicationName); ////context = helper.CreateClientContext(siteURL); ClientContext contexts = null; string siteURL = helper.GetSiteURL(SiteURLs.ITEMCODECREATIONSITEURL); if (!string.IsNullOrEmpty(siteURL)) { contexts = BELDataAccessLayer.Instance.CreateClientContextforattachment(siteURL); } return(helper.GetFileBytesByUrl(contexts, url)); }