Я обновил контроллер, чтобы получить ресурсы потока, но почему-то он все еще не работает
Код: Выделить всё
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;
}
}

Но мое приложение WP8 не может отобразить это изображение (отладка с помощью эмулятора).
Пока я Я не хочу хранить этот ресурс в своем проекте, так можно ли как-нибудь вернуть сюда эти изображения? (Любой другой тип файла позже, например, песня, видео...)
Подробнее здесь: https://stackoverflow.com/questions/304 ... pi-2-query
Мобильная версия