파람수정
This commit is contained in:
parent
78329b0502
commit
32c0b31b5d
@ -29,6 +29,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import io.company.localhost.common.annotation.ParameterCheck;
|
||||
import io.company.localhost.common.annotation.ReqMap;
|
||||
import io.company.localhost.common.dto.ApiResponse;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@ -49,7 +50,7 @@ public class ImageUploadController {
|
||||
*/
|
||||
@ParameterCheck
|
||||
@PostMapping("/upload")
|
||||
public ApiResponse<String> uploadImage(@RequestParam("file") MultipartFile file) throws IOException {
|
||||
public ApiResponse<String> uploadImage(@ReqMap MultipartFile file) throws IOException {
|
||||
|
||||
if (file.isEmpty()) {
|
||||
return ApiResponse.error(HttpStatus.BAD_REQUEST, "File is empty");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user