Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

MIMEType for excel files (.xlsx) in JCR Node

DIPEN_SEN_
Level 3
Level 3

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.

1 Accepted Solution
Arun_Patidar
Correct answer by
Community Advisor
Community Advisor

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

 

View solution in original post

1 Reply
Arun_Patidar
Correct answer by
Community Advisor
Community Advisor

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

 

View solution in original post