@RestController(value="cuba_FileUploadController")
@RequestMapping(path="/v2/files")
public class FileUploadController
extends java.lang.Object
Constructor and Description |
---|
FileUploadController() |
Modifier and Type | Method and Description |
---|---|
org.springframework.http.ResponseEntity<FileInfo> |
uploadFile(javax.servlet.http.HttpServletRequest request,
java.lang.String name)
Method for simple file upload.
|
org.springframework.http.ResponseEntity<FileInfo> |
uploadFile(org.springframework.web.multipart.MultipartFile file,
java.lang.String name,
javax.servlet.http.HttpServletRequest request)
Method for multipart file upload.
|
@PostMapping(consumes="!multipart/form-data") public org.springframework.http.ResponseEntity<FileInfo> uploadFile(javax.servlet.http.HttpServletRequest request, @RequestParam(required=false) java.lang.String name)
@PostMapping(consumes="multipart/form-data") public org.springframework.http.ResponseEntity<FileInfo> uploadFile(@RequestParam(value="file") org.springframework.web.multipart.MultipartFile file, @RequestParam(required=false) java.lang.String name, javax.servlet.http.HttpServletRequest request)