如何使用JSON数据对象在Postman中上传Mltipart文件

时间:2019-06-19 10:52:12

标签: json file postman

我不知道如何设置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

1 个答案:

答案 0 :(得分:0)

您可以通过JSON对象将上传的文件作为base64String发送。