Class FileUploadController

java.lang.Object
io.jmix.rest.impl.controller.FileUploadController

@RestController("rest_FileUploadController") @RequestMapping(path="/rest/files") public class FileUploadController extends Object
REST API controller that is used for uploading files
  • Field Details

  • Constructor Details

    • FileUploadController

      public FileUploadController()
  • Method Details

    • uploadFile

      @PostMapping(consumes="!multipart/form-data") public org.springframework.http.ResponseEntity<FileInfoResponse> uploadFile(jakarta.servlet.http.HttpServletRequest request, @RequestParam(required=false) String name, @RequestParam(required=false) String storageName)
      Method for simple file upload. File contents are placed in the request body. Optional file name parameter is passed as a query param.
    • uploadFile

      @PostMapping(consumes="multipart/form-data") public org.springframework.http.ResponseEntity<FileInfoResponse> uploadFile(@RequestParam("file") org.springframework.web.multipart.MultipartFile file, @RequestParam(required=false) String name, @RequestParam(required=false) String storageName, jakarta.servlet.http.HttpServletRequest request)
      Method for multipart file upload. It expects the file contents to be passed in the part called 'file'.
    • checkFileUploadPermission

      protected void checkFileUploadPermission()