コード例 #1
0
        /// <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));
        }
コード例 #2
0
        /// <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));
        }