Example #1
0
 private string MakePath(int fileId)
 {
     try
     {
         return(HttpContext.Current.Server.MapPath
                    (_imageFileService.GetImagePath(fileId)));
     }
     catch (NotSupportedException)
     {
         return(null);
     }
 }
Example #2
0
 /// <summary>
 /// Builds the URL for the app
 /// </summary>
 /// <param name="filename">The filename that the path should point to</param>
 /// <returns> A publiclly accesible URL to access the file</returns>
 private string BuildAppUrl(string filename)
 {
     return($"{HttpContext.Request.Scheme}://{HttpContext.Request.Host}/{imageFileService.GetImagePath()}/{filename}");
 }