Hello,
The following has been mentioned in the documentation regarding the algorithm 
used for selecting the primary node type of the file uploaded - 
"If a @TypeHint suffixed parameter is not present or the value does not denote 
an existing non-mixin node type, the node will be created as an nt:file node if 
the parent node is of type nt:folder. Otherwise the node will be created with 
primary node type nt:resource."

However, while playing around, I found it to be slightly different - 
The primary node type also depends on the "name" attribute of the <input 
type="file"> tag. If the input tag has a name attribute which is NOT *, for 
example, name="image", then the node is created with a name "image" and it has 
properties jcr:data, jcr:lastModified and jcr:mimeType. However, is the name 
attribute is *, name="*", then it doesn't matter whether the parent node is of 
type nt:folder or something else, the node for uploaded file is always created 
with node type as nt:file only.
Regards,Gaurav

Reply via email to