Default implementation of the IImageEditorCacheHandler interface that handles HTTP requests for cached images. This handler processes image downloads from various sources including image providers, canvas elements, and the file system.
Definition
Namespace:Telerik.Web.UI.ImageEditor
Assembly:Telerik.Web.UI.dll
Syntax:
public class ImageEditorCacheHandler : IHttpHandler
Inheritance: objectImageEditorCacheHandler
Implements:
Inherited Members
Constructors
public ImageEditorCacheHandler()
Properties
Gets or sets the graphics core implementation used for image processing operations.
public virtual IGraphicsCore GraphicsCore { get; set; }
public bool IsReusable { get; }
Implements:
Methods
Combines a file name from the name and extension provided. If filename is empty, then it uses a default one.
Combines the name of an editable image using the provided name and image format as extension.
public string CombineImageFileName(EditableImage editableImage, string fileName)
The editable image specifying the file extension
fileNamestringThe name of the image
Returns:Outputs an editable image to the HTTP response for viewing in the browser.
public virtual void OutputImage(EditableImage editableImage, HttpContext context)
The editable image to output.
contextHttpContextThe HTTP context for the response.
Outputs an editable image to the HTTP response as a file download.
public virtual void OutputImageForDownload(EditableImage editableImage, HttpContext context, string fileName)
The editable image to download.
contextHttpContextThe HTTP context for the response.
fileNamestringThe file name for the download.
Outputs an editable image with a specific file extension, converting the format if necessary.
public void OutputImageWithExtension(EditableImage editableImage, HttpContext context, string fileName, string customExt)
The editable image to output.
contextHttpContextThe HTTP context for the response.
fileNamestringThe desired file name.
customExtstringThe desired file extension.
Processes HTTP requests for image downloads, handling authentication and routing to appropriate download methods.
public void ProcessRequest(HttpContext context)
The HTTP context for the current request.
Implements:
Sends an editable image to the HTTP response, either for display or download.
public virtual void SendImage(EditableImage editableImage, HttpContext context, string downloadKey, string fileName)
The editable image to send.
contextHttpContextThe HTTP context for the response.
downloadKeystringThe download key indicating the operation type.
fileNamestringThe file name to use for downloads.
Sends a canvas-generated image (base64 encoded) to the HTTP response.
public virtual void SendImageCanvas(string base64String, HttpContext context, string downloadKey, string fileName, string mimeType)
The base64 encoded image data.
contextHttpContextThe HTTP context for the response.
downloadKeystringThe download key indicating the operation type.
fileNamestringThe file name to use for downloads.
mimeTypestringThe MIME type of the image.
Sets content-disposition header to the HttpResponse using the provided filename.
public virtual void SetHttpHeaderFileName(HttpContext context, string fileName)
The current HttpContext
fileNamestringThe filename to use