Details
-
Improvement
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
2.28.00
-
None
-
0
Description
This issue came up while fixing CMS7-7075 which is about empty files not being rendered in the CMS. This was caused by a fix we did for CMS7-6683 where it was decided that files with with zero bytes should not be rendered, all to work around the fact that embedded hippo:resources always contain some initial data due to the node definition and this initial data was causing confusion with users of the CMS.
This time, I fixed it (with help of Oscar and Mathijs) by introducing a new MIME type for uninitialized embedded resources: application/vnd.hippo.unintialized. But that raised the question, how does the HST actually handle these situations? So to make the model a bit nicer to work with, Mathijs proposed to add a helper method to a HippoResourceBean that checks whether the custom MIME type is present or not.