Bloom.Api.ApiRequest.ReplyWithImage C# (CSharp) Метод

ReplyWithImage() публичный Метод

public ReplyWithImage ( string localPath ) : void
localPath string
Результат void
        public void ReplyWithImage(string localPath)
        {
            _requestInfo.ReplyWithImage(localPath);
        }

Usage Example

Пример #1
0
 /// <summary>
 /// Called by the server to handle API calls for page thumbnails.
 /// </summary>
 public void HandleThumbnailRequest(ApiRequest request)
 {
     var filePath = request.LocalPath().Replace("api/pageTemplateThumbnail/","");
     var pathToExistingOrGeneratedThumbnail = FindOrGenerateThumbnail(filePath);
     if(string.IsNullOrEmpty(pathToExistingOrGeneratedThumbnail) || !File.Exists(pathToExistingOrGeneratedThumbnail))
     {
         request.Failed("Could not make a page thumbnail for "+filePath);
         return;
     }
     request.ReplyWithImage(pathToExistingOrGeneratedThumbnail);
 }