why Ipad can't download mp3 files?

Terbictioro

New Member
I have E-Commerce website and uploaded some mp3 files in it, customers can download the mp3 files to PC but when they try to download them to ipad, Ipad can't download them.the code of download files is the following\[code\]public static void DownloadAudio(string url){ if (HttpContext.Current.CurrentHandler is basePage) { HttpContext.Current.Response.Clear(); string fileDiskPath = HttpContext.Current.Server.MapPath(url); FileInfo fileInfo = new FileInfo(fileDiskPath); HttpContext.Current.Response.ContentType = "audio/mp3"; HttpContext.Current.Response.AddHeader("Content-Disposition", String.Format("attachment;filename={0}", fileInfo.Name)); HttpContext.Current.Response.AddHeader("Content-Length", fileInfo.Length.ToString()); HttpContext.Current.Response.WriteFile(fileDiskPath); //HttpContext.Current.Response.Flush(); HttpContext.Current.Response.End(); } else { throw new NotSupportedException("Note: This method is not supporting user controls. Consider supporting user controls by getting the parent page from user control."); }}\[/code\]
 
Back
Top