We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d02112 commit b0025a2Copy full SHA for b0025a2
APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/boot/FileController.java
@@ -108,7 +108,9 @@ public JSONObject upload(@RequestParam("file") MultipartFile file) {
108
fileOutputStream.write(file.getBytes());
109
fileOutputStream.close();
110
111
- fileNames.add(file.getOriginalFilename());
+ if (fileNames != null && ! fileNames.isEmpty()) {
112
+ fileNames.add(file.getOriginalFilename());
113
+ }
114
115
JSONObject res = new JSONObject();
116
res.put("path", "/download/" + file.getOriginalFilename());
0 commit comments