Ejemplo n.º 1
0
        public FileDownloader Download(int id, string filePath, FileDownloader.OnProgress onProgress, FileDownloader.OnComplete onComplete)
        {
            var parameters = new Dictionary <string, int>();

            parameters.Add("meetingId", id);

            var url = WebInterface.rlcBaseUrl + WebInterface.downloadFile;

            url = url.AppendParameters(parameters);

            FileDownloader downloader = new FileDownloader();
            var            authorizationHeaderValue = "Bearer " + m_webInterface.AccessToken;

            downloader.AddHeader("Authorization", authorizationHeaderValue);
            Debug.Log("Downloading: " + url + " at: " + filePath);
            FileDownloader.onProgress += onProgress;
            FileDownloader.onComplete += onComplete;
            downloader.Download(url, filePath);
            return(downloader);
            //DownloadFile();
        }