Managed File Field and file_usage_add() - what should I attach the file to? I'm creating a module which uses the Form API and integrates with the Mantis bugtracker system.  I have included a managed file field on the form and am at the stage of handling the form submission.  The Form API documentation mentions that you must make a call to file_usage_add:

Without the call to file_usage_add, file_managed_file_validate produces an error upon saving the form, saying that the uploaded file may not be referenced.


Here is the signature for file_usage_add():

file_usage_add(stdClass $file, $module, $type, $id, $count = 1)


And the explanation of the parameters:

$file: A file object.

$module: The name of the module using the file.

$type: The type of the object that contains the referenced file.

$id: The unique, numeric ID of the object containing the referenced file.

$count: (optional) The number of references to add to the object. Defaults to 1.


The problem I have is that my module doesn't create any nodes to attach the file to.  I just want to store the file in the filesystem and then send it off to Mantis.

Any suggestions on what I can enter for the $type and $id parameters?
I attached the file to user 1 and can't see any adverse effects as yet:

file_usage_add($file, 'mantis', 'user', 1);


I also OMITTED the following line from my submit function:

$file-&gt;status = FILE_STATUS_PERMANENT;


This means that the file will be deleted after 6 hours when cron runs.  

If anyone has a better solution then I'll be happy to mark as answer.