Class UploadDownloadController

java.lang.Object
com.jibi.controller.UploadDownloadController

@RestController("Upload Download Api") public class UploadDownloadController extends Object
The type Upload download controller.
  • Constructor Details

    • UploadDownloadController

      public UploadDownloadController()
  • Method Details

    • upload

      @RequestMapping(value="/upload", method=POST, consumes="multipart/form-data", produces={"application/json","application/xml"}) public UploadInfoModel upload(@RequestParam("file") org.springframework.web.multipart.MultipartFile file) throws IOException
      Upload upload info model.
      Parameters:
      file - the file
      Returns:
      the upload info model
      Throws:
      IOException - the io exception
    • download

      @RequestMapping(value="/download", method=GET, produces="text/plain") public byte[] download() throws IOException
      Download byte [ ].
      Returns:
      the byte [ ]
      Throws:
      IOException - the io exception
    • downloadSize

      @RequestMapping(value="/download/{size}", method=GET, produces="text/plain") public byte[] downloadSize(@PathVariable("size") String size) throws IOException
      Download size byte [ ].
      Parameters:
      size - the size
      Returns:
      the byte [ ]
      Throws:
      IOException - the io exception