Class OtherMaterialController
- java.lang.Object
-
- no.nsd.qddt.domain.othermaterial.web.OtherMaterialController
-
@RestController @RequestMapping("/othermaterial") public class OtherMaterialController extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description OtherMaterialController(OtherMaterialService service)
-
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)
-
-
-
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
-
-