Class FileUploadService


  • public final class FileUploadService
    extends java.lang.Object
    This service provides utils to extract parameters from multipart request using Jakarta Commons FileUpload.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getFileNameOnly​(org.apache.commons.fileupload.FileItem fileItem)
      Return the file name, without its whole path, from the file item.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getFileNameOnly

        public static java.lang.String getFileNameOnly​(org.apache.commons.fileupload.FileItem fileItem)
        Return the file name, without its whole path, from the file item. This should be used has FileItem.getName can return the whole path.
        Parameters:
        fileItem - the fileItem to process
        Returns:
        the name of the file associated