Yes,in class.attachment.php file I found the GenericAttachments class that has a couple of useful methods: and .the function takes two parameters:(array) $files - it's an array of associative arrays with key "id" and "inline"(bool) $inline - I don't understand what "inline" means here but I have found it also in the ost_attachments table of the db.
The function it's quite the same but it takes only one file (with "id" and "inline").
I don't know how can I use these methods without an id.
Now i'm looking into include/class.file.php and maybe I've found the right function