Details
Description
In CiviHR, we need to be able to add attachments to a leave request. The Attachment API + the civicrm/ajax/attachment callback do almost everything of what we need, except that the information about which user added the attachment, which isn't store anywhere.
Our idea is to add a contact_id field to civicrm_file, which the Attachment.create API will use to store the ID of the logged in user. The field will be optional, and it's default value will be null (to avoid problems with existing files and with deleted contacts).
Do you think this solution makes sense? I'm going to create a PR for this, but first I wanted to check if the solution is OK or if I'm missing something.