Class FileUploadUtils


  • public class FileUploadUtils
    extends Object
    • Method Detail

      • saveToTempFile

        public static File saveToTempFile​(javax.servlet.http.Part part)
                                   throws IOException
        Saves an uploaded file to a tempfile with prefix 'molgenis-', keeps the original file extension
        Returns:
        the saved temp file or null is no file selected
        Throws:
        IOException
      • saveToTempFolder

        public static File saveToTempFolder​(javax.servlet.http.Part part)
                                     throws IOException
        Save an Uploaded file to the temp folder keeping it original name
        Throws:
        IOException
      • getOriginalFileName

        public static String getOriginalFileName​(javax.servlet.http.Part part)
        Get the filename of an uploaded file
        Returns:
        the filename or null if not present