Skip to content

DevExpress-Examples/asp-net-web-forms-html-editor-process-base64-images

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HTML Editor for ASP.NET Web Forms - How to process images inserted in Base64 format

This example demonstrates how to process images pasted as Base64 strings (for instance, images pasted from the clipboard), save them on the server, and work with the related resource links.

Implementation Details

Follow the steps below to process images:

  1. Subscribe to the HtmlCorrecting event.
  2. In the event handler, process img tags that contain Base64 data.
  3. Retrieve serialized image data from a Base64 string and convert it to an array of bytes.
  4. Save the array of bytes as an image file on the server and generate a client URL to the newly created file.
  5. Replace the src attribute value of the processed img tag with the generated client URL.

Files to Review

About

Process images pasted as Base64 strings (for instance, images pasted from the clipboard), save them on the server, and work with the related resource links.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •