Revert "BAEL-4134"
This commit is contained in:
committed by
GitHub
parent
4a35b97bad
commit
7ab2f437ee
+17
@@ -0,0 +1,17 @@
|
||||
package com.baeldung.multiparttesting;
|
||||
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
@RestController
|
||||
public class MultipartPostRequestController {
|
||||
|
||||
@PostMapping(path = "/upload")
|
||||
public ResponseEntity<String> uploadFile(@RequestParam("file") MultipartFile file) {
|
||||
return file.isEmpty() ? new ResponseEntity<String>(HttpStatus.NOT_FOUND) : new ResponseEntity<String>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
Hello World
|
||||
Reference in New Issue
Block a user