Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-19948

Store the Attachment uploader information

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 4.7.15
    • Fix Version/s: 5.3
    • Component/s: CiviHR
    • Labels:
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      Developer Doc
    • Funding Source:
      Needs Funding
    • Verified?:
      No

      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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              davialexandre Davi Tavares Alexandre
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: