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); }
public void Dispose() { BloomServer.RemoveSimulatedPageFile(Key); }
/// <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)); }