javascript - Unable to read excel file using MultipartFormdataInput in Rest Call -


i using multipartformdatainput read excel file in rest call. server code mentioned below.

@post @path("/uploadedfile")  @consumes("multipart/form-data")  @produces({ "text/html" })      public /*jsonarray*/ string uploadedfile(multipartformdatainput input) throws exception          {         map<string, list<inputpart>> uploadform = input.getformdatamap();         list<inputpart> inputparts = uploadform.get("file");         system.out.println("in rest call file got" );          inputpart inputpart = inputparts.get(0);         inputstream inputstream = inputpart.getbody(inputstream.class, null);          xssfworkbook workbook = new xssfworkbook(inputstream);         .....      } 

now throw exception while reading inputstream? can tell me what's wrong in or there other way can totally new in area

exception is:

unable find messagebodyreader media type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet , class type java.io.fileinputstream 


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -