Package com.jibi.controller
Class UploadDownloadController
java.lang.Object
com.jibi.controller.UploadDownloadController
The type Upload download controller.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]download()Download byte [ ].byte[]downloadSize(String size) Download size byte [ ].upload(org.springframework.web.multipart.MultipartFile file) Upload upload info model.
-
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 IOExceptionDownload 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
-