It's super easy. First things first, you need to either decorate your File object or use a subclass, because the File object is going to need a foreign key to tie it back to its holder object.
class MyFile extends File
{
static $has_one = array (
'SomeDataObject' => 'SomeDataObject'
);
}
Somewhere in your form function, set:
SWFUploadControls::$file_class = "MyFile";
If that throws an error, update SWFUpload. That property was added recently. If you're using a decorator, you don't need that step because the value defaults to "File."
Then in the handler for your form post, you have the array $data['uploaded_files'], which is a list of all the file IDs that were uploaded through SWFUpload.
if(isset($data['uploaded_files']) && is_array($data['uploaded_files'])) {
foreach($data['uploaded_files'] as $id) {
if($file = DataObject::get_by_id("MyFile", $id)) {
$file->SomeDataObjectID = $someDataObject->ID;
$file->write();
}
}
}