C# 从服务器返回未在safari上显示的图像
我有一个web api url,使用它从服务器检索图像,并将其显示在ios应用程序和android应用程序上。问题是这个url在chrome和e-explorer上工作,但在safari上不工作(它在问号内显示蓝色框) 请您帮助发布asp.net c代码,用于从safari服务器检索图像 下面是我用来检索图像的代码C# 从服务器返回未在safari上显示的图像,c#,ios,image,asp.net-web-api,safari,C#,Ios,Image,Asp.net Web Api,Safari,我有一个web api url,使用它从服务器检索图像,并将其显示在ios应用程序和android应用程序上。问题是这个url在chrome和e-explorer上工作,但在safari上不工作(它在问号内显示蓝色框) 请您帮助发布asp.net c代码,用于从safari服务器检索图像 下面是我用来检索图像的代码 public HttpResponseMessage Get() { using (FileStream fstream = new FileStream(filePath,
public HttpResponseMessage Get()
{
using (FileStream fstream = new FileStream(filePath, FileMode.Open))
{
HttpResponseMessage response = new HttpResponseMessage();
response.Content = new StreamContent(fstream );
response.Content.Headers.ContentType = new MediaTypeHeaderValue("image/jpeg");
return response;
}
}