Inheritance: EnhancedImageServer
Esempio n. 1
0
 public void ReplyWithImage(string path, string originalPath = null)
 {
     if (path != null)
     {
         var pos = path.LastIndexOf('.');
         if (pos > 0)
         {
             _actualContext.Response.ContentType = BloomServer.GetContentType(path.Substring(pos));
         }
     }
     ReplyWithFileContent(path, originalPath);
 }
Esempio n. 2
0
 public void Dispose()
 {
     BloomServer.RemoveSimulatedPageFile(Key);
 }
Esempio n. 3
0
 /// <summary>
 /// Get the actual local path that the server would retrieve given a Bloom URL
 /// that ends up at a local file. For now it is mainly useful for things in the book folder; it doesn't have
 /// all the smarts to locate files shipped with the application, it is just concerned with reversing
 /// the various tricks we use to encode paths as URLs.
 /// </summary>
 public string LocalPath()
 {
     return(BloomServer.GetLocalPathWithoutQuery(this._requestInfo));
 }