Interface IUploadFileServletPlugin


  • public interface IUploadFileServletPlugin
    Allows a platform plugin to provide it's own file uploading capability which is not currently supported in IContentGenerator.
    Author:
    aphillips
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      String getFileExtension()
      The file extension to append to the randomly generated filename resulting from the file upload.
      long getMaxFileSize()
      The maximum permitted upload file size in bytes
      long getMaxFolderSize()
      The maximum number of files allowed in the target folder.
      String getTargetFolder()
      A path where the uploaded files will be saved, relative to the solution path.
      void onSuccess​(String pathToFile, javax.servlet.http.HttpServletResponse response)
      A callback invoked upon successful file upload.
    • Method Detail

      • getTargetFolder

        String getTargetFolder()
        A path where the uploaded files will be saved, relative to the solution path.
        Returns:
        solution-relative path where files will be saved.
      • getMaxFileSize

        long getMaxFileSize()
        The maximum permitted upload file size in bytes
        Returns:
        max files size in bytes
      • getMaxFolderSize

        long getMaxFolderSize()
        The maximum number of files allowed in the target folder.
        Returns:
        max number of files in target folder
      • getFileExtension

        String getFileExtension()
        The file extension to append to the randomly generated filename resulting from the file upload.
        Returns:
        the file extension (must explicitly include the '.' character)
      • onSuccess

        void onSuccess​(String pathToFile,
                       javax.servlet.http.HttpServletResponse response)
        A callback invoked upon successful file upload. The UploadFileServlet can do whatever it needs to with the repsonse which will be the actual servlet response.
        Parameters:
        pathToFile - the absolute path to the file successfully uploaded
        response - the servlet response when the file upload succeedes