Class Base64ImageUploadProcessor

java.lang.Object
com.skava.assets.processor.Base64ImageUploadProcessor
All Implemented Interfaces:
org.apache.camel.Processor

@Component @Service("base64ImageUploadProcessor") public class Base64ImageUploadProcessor extends Object implements org.apache.camel.Processor
  • Constructor Details

    • Base64ImageUploadProcessor

      public Base64ImageUploadProcessor()
  • Method Details

    • process

      public void process(org.apache.camel.Exchange exchange) throws Exception

      This processor class is used to convert the base64image data URL to the Content and then to save the respective content to framework ContentRepository

      Specified by:
      process in interface org.apache.camel.Processor
      Throws:
      Exception
    • validateImage

      public boolean validateImage(String base64String)
    • uploadContent

      public void uploadContent(org.apache.camel.Exchange exchange, String base64String, String fileName) throws IOException

      uploadContent

      Throws:
      IOException
    • setErrorResponse

      public void setErrorResponse(org.apache.camel.Exchange exchange) throws com.fasterxml.jackson.core.JsonProcessingException
      setErrorResponse - This method is to set the errorResponse
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException
    • validateAndGetFileName

      public String validateAndGetFileName(String fileName)
      validateAndGetFileName - This method is to validate and get the fileName and Extensions