MIMEType for excel files (.xlsx) in JCR Node

Avatar

Avatar

DIPEN1

Avatar

DIPEN1

DIPEN1

04-12-2019

Hi,

I am trying to create a nt:file node for excel file. I am trying to add property of mimetype as "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet".

But I am getting exception "javax.jcr.nodetype.ConstraintViolationException: No matching property definition: mimeType = application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"

Code : node.setProperty("mimeType", mimeTypeService.getMimeType("xlsx"));

However if I upload an excel file in dam , jcr:content under original node has property "jcr:mimeType" with value "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"

Please provide some pointers.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.1K

Correct Reply

839

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.1K

Correct Reply

839
Arun_Patidar
MVP

22-12-2019

can you please check where are you adding the property, if it is nt unstructured node, then it should work

 

Answers (0)