AnsweredAssumed Answered

Content mimetype property not a String

Question asked by jordiv on Oct 10, 2011
Latest reply on Oct 11, 2011 by jordiv
Hi,

Inside an Alfresco webscript, given a node, I get its mime type as follows:
var mimeType = nodeVar.mimetype;
// This is also valid:
// var mimeType = nodeVar.properties.content.mimetype;

I get it succesfully, but the type of mimeType variable is object instead of String (as it should be according to the wiki). This can be checked by doing:
typeof nodeVar.mimetype;
I can change it to String by doing something like:
var mimeType = "" + nodeVar.mimetype;
But I would like to know if this is a bug or I'm doing something wrong.

Thanks,
Jordi.

Outcomes