Class FilesRestController

java.lang.Object
ru.i_novus.ms.rdm.n2o.service.FilesRestController

@RestController
@RequestMapping("/files")
public class FilesRestController
extends java.lang.Object
  • Constructor Summary

    Constructors 
    Constructor Description
    FilesRestController​(FileStorageService fileStorageService, VersionRestService versionService)  
  • Method Summary

    Modifier and Type Method Description
    org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> downloadFile​(java.lang.Integer versionId, FileType type)  
    FileModel uploadFile​(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 Details

  • Method Details

    • uploadFile

      @CrossOrigin(origins="*") @PostMapping("") public FileModel uploadFile​(@RequestParam("file") org.springframework.web.multipart.MultipartFile file) throws java.io.IOException
      Throws:
      java.io.IOException
    • downloadFile

      @CrossOrigin(origins="*") @GetMapping("/{versionId}/{type}") public org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> downloadFile​(@PathVariable java.lang.Integer versionId, @PathVariable FileType type)