Class AbstractCxboxFileController

java.lang.Object
org.cxbox.core.file.controller.AbstractCxboxFileController
All Implemented Interfaces:
CxboxFileController

public abstract class AbstractCxboxFileController extends Object implements CxboxFileController
  • Constructor Details

    • AbstractCxboxFileController

      public AbstractCxboxFileController()
  • Method Details

    • upload

      @PostMapping(consumes="multipart/form-data") public CxboxResponseDTO<FileUploadDto> upload(org.springframework.web.multipart.MultipartFile file, String source)
      Description copied from interface: CxboxFileController
      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
      Specified by:
      upload in interface CxboxFileController
    • download

      @GetMapping public org.springframework.http.HttpEntity<org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBody> download(String id, String source, boolean preview)
      Description copied from interface: CxboxFileController
      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
      Specified by:
      download in interface CxboxFileController
    • remove

      @DeleteMapping public CxboxResponseDTO<Void> remove(String id, String source)
      Description copied from interface: CxboxFileController
      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
      Specified by:
      remove in interface CxboxFileController