Hello,
Following are my solution:
This solution will works only, when you save your file at mentioned location:
I am saving file at
ApplicationData.Current.LocalFolder;
using server code and displaying at client (browser) side using
<img src="c://data//users//defapps//logo.png" />
C# Code
public async Task saveImage(Stream photoToSave, string modeuleName, string menuID, string imageURL)
{
StorageFolder localFolder = ApplicationData.Current.LocalFolder;
StorageFile photoFile = null;
try
{
string ext = Path.GetExtension(imageURL.Trim());
photoFile = await localFolder.CreateFileAsync(modeuleName + ext, CreationCollisionOption.ReplaceExisting);
using (var photoOutputStream = await photoFile.OpenStreamForWriteAsync())
{
await photoToSave.CopyToAsync(photoOutputStream);
totalImagesToDownload--;
await sendResponse();
}
}
catch (Exception e)
{
totalImagesToDownload--;
Debug.WriteLine(e.Message);
}
}
HTML Code
<img src="c://data//users//defapps//logo.png" />