diff options
author | Vitaly Takmazov | 2018-02-15 11:57:48 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-02-15 12:01:54 +0300 |
commit | 1fcbd6b5d9938a86f2ad1bceca171567ae52e1c7 (patch) | |
tree | 09f881a83d3b2a426a49a8b00f5bde95d9259dfa /juick-server/src/main/java/com | |
parent | 2535b334ec7ffc5d81d6f05df2449d6de8861b3b (diff) |
server: upload file api method
Diffstat (limited to 'juick-server/src/main/java/com')
-rw-r--r-- | juick-server/src/main/java/com/juick/server/api/Post.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/juick-server/src/main/java/com/juick/server/api/Post.java b/juick-server/src/main/java/com/juick/server/api/Post.java index 7f014d9e..19751d2e 100644 --- a/juick-server/src/main/java/com/juick/server/api/Post.java +++ b/juick-server/src/main/java/com/juick/server/api/Post.java @@ -105,6 +105,10 @@ public class Post { } serverManager.processMessage(visitor, body, attachmentFName); } + @PostMapping("/upload") + public String doUploadFile(@RequestParam(required = true) MultipartFile attach) { + return HttpUtils.receiveMultiPartFile(attach, tmpDir); + } @RequestMapping(value = "/comment", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) public com.juick.Message doPostComment( |