Я обновил контроллер, чтобы получить ресурсы потока, но некоторые из них все еще не работают < /p>
public class ResourcesController : Controller
{
public string Directory = @"D:\Desktop\MusicDatabase\Image\";
[HttpGet]
[Route("Image/{type}/{id}")]
public HttpResponseMessage Image(string type, string id)
{
HttpResponseMessage httpResponseMessage = new HttpResponseMessage(HttpStatusCode.OK);
var url = Path.Combine(Directory, type, id + ".jpg");
byte[] fileData = System.IO.File.ReadAllBytes(url);
MemoryStream ms = new MemoryStream(fileData);
httpResponseMessage.Content = new StreamContent(ms);
httpResponseMessage.Content.Headers.ContentType = new MediaTypeHeaderValue("image/jpg");
return httpResponseMessage;
}
}
< /code>
он возвращает строку, а не файл Resoure < /p>

But my WP8 app can't show Это изображение (отладка с эмулятором).
, пока я не хочу хранить этот ресурс в моем проекте, так что есть ли здесь, чтобы вернуть эти изображения здесь? (Любой дифферентный тип файла позже, например, песня, видео ...)
Подробнее здесь: https://stackoverflow.com/questions/304 ... pi-2-query
Мобильная версия