I have used insertHTTPFile to add some binary content as the content of an attribute. But this is not the case.
I have no file attribs an my class. I want to add this uploaded file as a related object of a main node.
I try to explain it better. Let's suppose my test class has only one field. Let's called it name.
in my template i have an form with a text field for name and some input files fields to add files as related content, not as attributes of the object i'm creating.
Do you think insertHTTPFile could still be valid for my purpose?
I suggest to use contetobjects anyway. Then you still need to create one more content object, e.g binary file where you will need to store file from user in attribute, then add relation using PHP to your primary object where is only "Name". You can also make structure where object with file is a child of primary object, then just fetch it in tpl. Hope that will help you.