AnsweredAssumed Answered

CMIS Issue in Uploading Microsoft Documents.

Question asked by suvaraj on Feb 25, 2009
I am trying to upload Upload documents like Word,Excel.But CMIS creates the documents of 0 byte size.

The mimetype of any file(png, jpeg, excel, etc) uploaded through the CMIS API is considered as application/octet stream. How to i change the mime type.

Below is the sample code which I have used to upload the Excel.
DataSource graphImageDataSource = new FileDataSource("D:\\Documents and Settings\\All Users\\Documents\\" + "SampleExcel.xls");
// Create the dataHandler out of the above created datasource
DataHandler graphImageDataHandler = new DataHandler(graphImageDataSource, "application/");
System.err.println("1111111111 graphImageDataHandler.getContentType():::: "+graphImageDataHandler.getContentType());
CmisContentStreamType cmisStream = new CmisContentStreamType();

Please let me know what I am missing out.

I have to resolve it as soon as possible.