on ‎2018 Jul 04 5:50 AM
Request clarification before answering.
Hi Kundan,
From docs of MediaService: "Operating on files is no more supported. Use InputStream related methods." I think that getStreamFromMedia() method is the metod you are looking for.
Best Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Jakub, getStreamFromMedia() method worked well for my requirement. I am able to get file from MediaModel.
final FileInputStream inputStream = (FileInputStream) mediaService.getStreamFromMedia(media);
final XSSFWorkbook wb = new XSSFWorkbook(inputStream);
final int numberOfSheets = wb.getNumberOfSheets();
Thanks, Kundan
| User | Count |
|---|---|
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.