Recurrent issue with disappearing attachments

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • abidoss
    Senior Member
    • Mar 2023
    • 250

    #1

    Recurrent issue with disappearing attachments

    I’m experiencing a recurring issue with attachments (images, PDFs) disappearing — both from the upload directory and the database. Sometimes, only the file ID remains in the upload folder. This issue occurs unpredictably and affects several entities, even though no changes have been made to the records for months.
    As for the images, I had replaced them recently, but after about a month, they have disappeared again.
    I noticed that this problem has already been mentioned before, but it still doesn’t seem to have been resolved.

    For the images that disappeared, I only use this same form in another entity called Case.
    logoId = partenaire.logoId ;
    logo1Id = client.logoId ;



  • abidoss
    Senior Member
    • Mar 2023
    • 250

    #2
    Here’s the issue I’m facing with this entity: every month, a portal user submits their timesheet with an attachment, but each new month, I find that the attachment from the previous month has been deleted
    Attached Files

    Comment

    • emillod
      Active Community Member
      • Apr 2017
      • 1503

      #3
      Is it possible that you have some kind of automation? The attachment is still visible on Attachment list in Admin section?

      Comment

      • yuri
        EspoCRM product developer
        • Mar 2014
        • 9449

        #4
        Attachments with the following role values are removed automatically by the cleanup job.

        - Export File
        - Mail Merge
        - Mass Pdf

        If you create attachments record with such roles, you need to change the role to 'Attachment'.

        Also attachments with 'isBeingUploaded' set to true are automatically removed by the cleaup job.

        Make sure you that do NOT have the 'cleanupOrphanAttachments' parameter enabled in the config. It should not be set to true. This parameter is not enabled by default.

        Also it's possible that attachments were removed by an admin user manually from the Administration > Attachments by a mistake. It happenned.

        We have never experienced any attachment removal incidents.
        Last edited by yuri; Today, 11:46 AM.
        If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

        Comment

        • abidoss
          Senior Member
          • Mar 2023
          • 250

          #5
          Hello,
          No, I don’t have the cleanup parameter enabled. I’m the only administrator, and no one else has permission to delete anything.
          When I check Administration > Attachments, I can’t find the attachments related to this entity, even though I can see a list of attachments in the record itself.

          To explain how it works: portal users upload their timesheet with an attachment at the end of each month in the Timesheet entity. Then, a workflow is triggered on these records to create a copy for historical tracking (see the workflow screenshot below).

          After checking, I noticed that the attachments do not appear in Administration > Attachments, but they are still visible in the records for the current month.
          Attached Files

          Comment

          Working...