Class FileUploadUtil
- java.lang.Object
-
- ubic.gemma.web.controller.util.upload.FileUploadUtil
-
public class FileUploadUtil extends Object
Utility methods for uploading files.- Author:
- pavlidis
-
-
Constructor Summary
Constructors Constructor Description FileUploadUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Path
copyUploadedFile(javax.servlet.http.HttpServletRequest request, String key, Path uploadDir)
static Path
copyUploadedFile(org.springframework.web.multipart.MultipartFile multipartFile, javax.servlet.http.HttpServletRequest request, Path uploadDir)
static Path
copyUploadedInputStream(InputStream is, Path uploadDir)
static Path
getUploadedFile(String filename, Path uploadDir)
Obtain the path for a previously uploaded file.
-
-
-
Method Detail
-
getUploadedFile
public static Path getUploadedFile(String filename, Path uploadDir)
Obtain the path for a previously uploaded file.
-
copyUploadedFile
public static Path copyUploadedFile(javax.servlet.http.HttpServletRequest request, String key, Path uploadDir) throws IOException
- Throws:
IOException
-
copyUploadedFile
public static Path copyUploadedFile(org.springframework.web.multipart.MultipartFile multipartFile, @Nullable javax.servlet.http.HttpServletRequest request, Path uploadDir) throws IOException
- Throws:
IOException
-
copyUploadedInputStream
public static Path copyUploadedInputStream(InputStream is, Path uploadDir) throws IOException
- Throws:
IOException
-
-