We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d478824 commit a22bfabCopy full SHA for a22bfab
spring-mvc-jquery-file-upload/src/main/java/com/hmkcode/spring/mvc/controllers/FileController.java
@@ -57,6 +57,10 @@ public class FileController {
57
58
try {
59
fileMeta.setBytes(mpf.getBytes());
60
+
61
+ // copy file to local disk (make sure the path "e.g. D:/temp/files" exists)
62
+ FileCopyUtils.copy(mpf.getBytes(), new FileOutputStream("D:/temp/files/"+mpf.getOriginalFilename()));
63
64
} catch (IOException e) {
65
// TODO Auto-generated catch block
66
e.printStackTrace();
0 commit comments