Files
Tbed/src/main/java/cn/hellohao/controller/ClientController.java
T
2021-10-29 14:23:40 +08:00

35 lines
999 B
Java

package cn.hellohao.controller;
import cn.hellohao.pojo.Msg;
import cn.hellohao.service.impl.ClientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
/**
* @author Hellohao
* @version 1.0
* @date 2019-07-18 17:22
*/
@RestController
public class ClientController {
@Autowired
private ClientService clientService;
@PostMapping(value = "/uploadbymail")
@ResponseBody
public Msg uploadbymail(HttpServletRequest request, @RequestParam("file") MultipartFile file, String mail, String pass) {
Msg resultBean = clientService.uploadImg(request, file, mail, pass);
return resultBean;
}
}