src/BloomExe/web/controllers/PageTemplatesApi.cs
/// <summary>
/// Called by the server to handle API calls for page thumbnails.
/// </summary>
Called by the server to handle API calls for page thumbnails.
Called by the server to handle API calls for page thumbnails .
public void HandleThumbnailRequest(ApiRequest request)
		{
			var filePath = request.LocalPath().Replace("api/pageTemplateThumbnail/","");
			var pathToExistingOrGeneratedThumbnail = FindOrGenerateThumbnail(filePath);
			if(string.IsNullOrEmpty(pathToExistingOrGeneratedThumbnail) || !RobustFile.Exists(pathToExistingOrGeneratedThumbnail))
			{
				request.Failed("Could not make a page thumbnail for "+filePath);
				return;
			}
			request.ReplyWithImage(pathToExistingOrGeneratedThumbnail);
		}
public void HandleThumbnailRequest ( ApiRequest request ) { var filePath = request . LocalPath ( ) . Replace ( " " , " " ) ; var pathToExistingOrGeneratedThumbnail = FindOrGenerateThumbnail ( filePath ) ; if ( string . IsNullOrEmpty ( pathToExistingOrGeneratedThumbnail ) || ! RobustFile . Exists ( pathToExistingOrGeneratedThumbnail ) ) { request . Failed ( " " + filePath ) ; return ; } request . ReplyWithImage ( pathToExistingOrGeneratedThumbnail ) ; }
Called by the server to handle API calls for page thumbnails.
Called by the server to handle API calls for page thumbnails .
request
ApiRequest