Package org.cxbox.core.file.controller
Class CxboxFileControllerSimple
java.lang.Object
org.cxbox.core.file.controller.CxboxFileControllerSimple
- All Implemented Interfaces:
CxboxFileController
@RestController
@RequestMapping("#{ (${cxbox.api.use-servlet-context-path} == true) ? \'\': \'${cxbox.api.path}\'}/file")
@ConditionalOnMissingBean(CxboxFileController.class)
public class CxboxFileControllerSimple
extends Object
implements CxboxFileController
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.HttpEntity<byte[]>AddAddAddMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.cxbox.core.file.controller.CxboxFileController
buildFileHttpEntity, getMediaType
-
Constructor Details
-
CxboxFileControllerSimple
public CxboxFileControllerSimple()
-
-
Method Details
-
upload
@PostMapping(consumes="multipart/form-data") public CxboxResponseDTO<FileUploadDto> upload(org.springframework.web.multipart.MultipartFile file, String source) Description copied from interface:CxboxFileControllerAdd
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@PostMapping(consumes = MediaType.MULTIPART_FORM_DATA_VALUE)- Specified by:
uploadin interfaceCxboxFileController
-
download
@GetMapping public org.springframework.http.HttpEntity<byte[]> download(String id, String source, boolean preview) Description copied from interface:CxboxFileControllerAdd
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@GetMapping- Specified by:
downloadin interfaceCxboxFileController
-
remove
Description copied from interface:CxboxFileControllerAdd
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@DeleteMapping- Specified by:
removein interfaceCxboxFileController
-