Quantcast
Channel: Questions in topic: "ios"
Viewing all articles
Browse latest Browse all 4709

Downloading file using web client not working in all servers

$
0
0
I am using web client to download zip file to my game. But the file is getting downloaded from my server but not with my client's server. Here is the code which i am using. public void DownloadAndSaveZip(string m_zipURL, string m_zipFilePath, string m_zipFileNameToSave) { Debug.Log("DOWNLOADING ----------- " + m_zipURL); WebClient client = new WebClient(); client.DownloadFileCompleted += SuccessResponse; client.DownloadProgressChanged += Client_DownloadProgressChanged; client.DownloadFileAsync(new Uri(m_zipURL), m_zipFilePath + m_zipFileNameToSave); } private void Client_DownloadProgressChanged (object sender, DownloadProgressChangedEventArgs e) { Debug.Log ("Client_DownloadProgressChanged " + _progressAmount); } void SuccessResponse(object sender, System.ComponentModel.AsyncCompletedEventArgs e) { Debug.Log("Complete............"); if (e.Error == null) Debug.Log("If............"); else Debug.Log("Else.........."); } While using my server url for same file, it shows download progress but while using my client's url it directly calls DownloadFileComplete method with file size of 0. I have uploaded same file to both servers and both uses linux. Any help would be great. Thanks!

Viewing all articles
Browse latest Browse all 4709

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>