我不知道如何设置JSON数据对象以及文件上传
default ResponseEntity<FileUpload> updateFileInfo(@ApiParam(value = "Unique Identifier of the File",required=true) @PathVariable("fileId") UUID fileId,
@ApiParam(value = "") @RequestParam(value = "file", required = false) MultipartFile file,
@ApiParam(value = "") @RequestParam(value = "metadata", required = false) FileUpload metadata) {
if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
} else {
log.warn("ObjectMapper or HttpServletRequest not configured in default FilesApi interface so no example is generated");
}
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
}
我需要FileUplod对象的JSON
答案 0 :(得分:0)
您可以通过JSON对象将上传的文件作为base64String发送。