[eluser]Lockzi[/eluser]
Active record is just another way to insert data into the database.
Active Record Insert
$data = array(
'title' => $title,
'name' => $name,
'date' => $date
);
$this->db->insert('mytable', $data);
// Produces: INSERT INTO mytable (title, name, date) VALUES ('{$title}', '{$name}', '{$date}')
I guess those other file upload codes you have would include the bufferings.
What I would try then is something like this
$fileUploadBufferFromOriginalCode = (whatever the variable is);
$databaseInput .= $fileUploadBufferFromOriginalCode;
And then later when the whole file has been buffered I would do something like this
$fileData = array(
fileName => $theVariableThatContainsFileName,
fileData => $databaseInput
);