Liferay UploadRequest getFiles does not create temp files which has size lessthan ~ 1.5 KB or ~ 1 KB
Hello, If you are using the UploadRequest.getFileNames(“testFiles”) and if you upload file size less than around 1.5 KB Liferay is not creating the temp files and the we can not use those files for saving it in the document library. So the solution would be using the below code. InputStream[] streams = uploadReq.getFilesAsStream(“testFiles”); for(InputStream is : streams){ File file = FileUtil. createTempFile (inputStream); }