Package org.molgenis.core.util
Class FileUploadUtils
- java.lang.Object
-
- org.molgenis.core.util.FileUploadUtils
-
public class FileUploadUtils extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetOriginalFileName(javax.servlet.http.Part part)Get the filename of an uploaded filestatic FilesaveToTempFile(javax.servlet.http.Part part)Saves an uploaded file to a tempfile with prefix 'molgenis-', keeps the original file extensionstatic FilesaveToTempFolder(javax.servlet.http.Part part)Save an Uploaded file to the temp folder keeping it original name
-
-
-
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
-
-