Class SplibComponentUtil

java.lang.Object
jp.ecuacion.splib.web.util.SplibComponentUtil

public class SplibComponentUtil extends Object
Provides utilities for html components processing.
  • Constructor Details

    • SplibComponentUtil

      public SplibComponentUtil()
  • Method Details

    • saveUploadedFile

      public static String saveUploadedFile(org.springframework.web.multipart.MultipartFile file) throws Exception
      Saves uploaded file.

      The file is saved at work directory, which is specified by

      Parameters:
      file - file
      Returns:
      file saved path, may be null when file is not uploaded.
      Throws:
      Exception - Exception
    • saveUploadedFile

      public static String saveUploadedFile(String base64) throws Exception
      Saves uploaded file.

      The file is saved at work directory, which is specified by

      Parameters:
      base64 - file
      Returns:
      file saved path, may be null when file is not uploaded.
      Throws:
      Exception - Exception
    • getPictureDataBase64

      public static String getPictureDataBase64(String path, String pictureFormat) throws Exception
      Obtains picture data in BASE64 format.
      Parameters:
      path - path
      pictureFormat - jpeg, ...
      Returns:
      picture data in BASE64 format
      Throws:
      Exception - Exception