Class OtherMaterialController


  • @RestController
    @RequestMapping("/othermaterial")
    public class OtherMaterialController
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.springframework.core.io.FileSystemResource getFile​(java.util.UUID root, java.lang.String fileName)  
      OtherMaterial handleFileUpload​(java.util.UUID ownerId, org.springframework.web.multipart.MultipartFile file)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OtherMaterialController

        @Autowired
        public OtherMaterialController​(OtherMaterialService service)
    • Method Detail

      • handleFileUpload

        @ResponseStatus(CREATED)
        @RequestMapping(value="/upload/{ownerid}",
                        method=POST,
                        headers="content-type=multipart/form-data")
        @ResponseBody
        public OtherMaterial handleFileUpload​(@PathVariable("ownerid")
                                              java.util.UUID ownerId,
                                              @RequestParam("file")
                                              org.springframework.web.multipart.MultipartFile file)
                                       throws java.io.IOException,
                                              FileUploadException
        Throws:
        java.io.IOException
        FileUploadException
      • getFile

        @RequestMapping(value="/files/{root}/{filename}",
                        method=GET,
                        produces="application/octet-stream")
        @ResponseBody
        public org.springframework.core.io.FileSystemResource getFile​(@PathVariable("root")
                                                                      java.util.UUID root,
                                                                      @PathVariable("filename")
                                                                      java.lang.String fileName)
                                                               throws java.io.IOException
        Throws:
        java.io.IOException