Interface CxboxFileController

All Known Implementing Classes:
CxboxFileControllerSimple

public interface CxboxFileController
Add

 @RestController
 @RequestMapping(CXBOX_API_PATH_SPEL + "/file")
 
on implementation class
  • Method Details

    • upload

      CxboxResponseDTO<? extends FileUploadDto> upload(@RequestParam("file") org.springframework.web.multipart.MultipartFile file, @RequestParam(value="source",required=false) String source)
      Add
      
       @PostMapping(consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
       
      on implementation class. You can extend api for /file endpoint (declaring method with another signature), so we are not placing @PostMapping on interface to avoid endpoints clash
    • download

      org.springframework.http.HttpEntity<byte[]> download(@RequestParam("id") String id, @RequestParam(value="source",required=false) String source, @RequestParam(value="preview",required=false,defaultValue="false") boolean preview)
      Add
      
       @GetMapping
       
      on implementation class. You can extend api for /file endpoint (declaring method with another signature), so we are not placing @PostMapping on interface to avoid endpoints clash.
      
       See buildFileHttpEntity example of constructing response for this method
    • remove

      CxboxResponseDTO<Void> remove(@RequestParam("id") String id, @RequestParam("source") String source)
      Add
      
       @DeleteMapping
       
      on implementation class. You can extend api for /file endpoint (declaring method with another signature), so we are not placing @PostMapping on interface to avoid endpoints clash
    • buildFileHttpEntity

      default org.springframework.http.HttpEntity<byte[]> buildFileHttpEntity(byte[] content, String fileName, String fileType, boolean inline)
    • getMediaType

      default org.springframework.http.MediaType getMediaType(String type)