master
ck 5 years ago
parent 05326c94bf
commit 996eca9014

@ -101,7 +101,7 @@ public class ArticleController {
* @throws IOException * @throws IOException
*/ */
@RequestMapping(value="/upload", produces = "text/html;charset=UTF-8") @RequestMapping(value="/upload", produces = "text/html;charset=UTF-8")
public void testUpload(MultipartFile file) throws IOException { public String testUpload(MultipartFile file) throws IOException {
if (file.isEmpty()) { if (file.isEmpty()) {
System.out.println("没文件"); System.out.println("没文件");
} }
@ -120,6 +120,7 @@ public class ArticleController {
if (!(dest.exists())) { if (!(dest.exists())) {
file.transferTo(dest); file.transferTo(dest);
} }
return filePath;
} }
/** /**

Loading…
Cancel
Save