24 lines
584 B
Java
24 lines
584 B
Java
package com.example.chat.controller;
|
|
|
|
import com.example.chat.service.HeadOss;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
import javax.annotation.Resource;
|
|
import java.io.File;
|
|
|
|
@Slf4j
|
|
@CrossOrigin
|
|
@RestController
|
|
public class IndexController {
|
|
|
|
@Resource
|
|
HeadOss headOss;
|
|
|
|
@RequestMapping("/chat/modifyHead")
|
|
public void modifyHead(@RequestParam("file")MultipartFile file, @RequestParam("username") String username) {
|
|
headOss.ModifyHead(username,file);
|
|
}
|
|
}
|