add attribute mimeCode in EmbeddedObject and correct template