SUPPORT-8771:add mock param
This commit is contained in:
parent
ed4437054e
commit
965a90549b
2 changed files with 3 additions and 7 deletions
|
|
@ -4,10 +4,7 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import ru.micord.av.service.model.ScanResult;
|
||||
import ru.micord.av.service.service.FileScanService;
|
||||
|
|
@ -26,7 +23,8 @@ public class FileScanController {
|
|||
}
|
||||
|
||||
@PostMapping("/scan-file")
|
||||
public ResponseEntity<?> scanFile(@RequestParam("file") MultipartFile file) {
|
||||
public ResponseEntity<?> scanFile(@RequestPart("file") MultipartFile file,
|
||||
@RequestParam(value = "wait", required = false, defaultValue = "0") long wait) {
|
||||
if (file.isEmpty()) {
|
||||
return ResponseEntity.badRequest().build();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1 @@
|
|||
spring.application.name=ervu-lkrp-kesl
|
||||
server.port=8080
|
||||
file.upload.directory = /tmp/uploaded_files
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue