Announcement

Collapse
No announcement yet.

use cleanupLostAttachments

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • use cleanupLostAttachments

    Hello,

    Has somebody used cleanupLostAttachments with Orphans option in cleanup job?
    I tried it and it makes "too much" clean.
    If i upload a custom logo in "preferences" screen (to be viewed at login and in the upper bar), the logo wil be added to attachment table with type "Settings". Next cleaning will clean it after my delay of days.
    'OR' => [
    [
    'parentId' => null,
    'parentType!=' => null,
    'relatedType=' => null,
    ],
    [
    'parentType' => null, (for companyLogo it is null)
    'relatedId' => null, (for companyLogo it is null)
    'relatedType!=' => null, (for companyLogo it is settings)
    ]
    Somebody experienced the same problem? Maybe i missed something. Any idea welcome.
    Maybe we customized something wrong :-/

  • #2
    Hi,

    This feature is experimental yet, not documented. I need to fix all such issues. Please let me know if you face other problems besides with the logo.
    Last edited by yuri; 04-15-2020, 06:19 AM.

    Comment


    • #3
      Here's the fix: https://github.com/espocrm/espocrm/c...18d676b657e33b

      You can see what attachments are considered as orphan at Administration > Attachments (in Data panel) > select text filter 'Orphan' (dropdown in the left of the text search input). You can manually remove them from there.

      Comment


      • #4
        Hello yurikuzn,
        Yes, i know it is experimental but i wanted to know if someone had tried it this way. I've done a custom job for our needs with some restrictions in emails to be deleted for example. Now i wanted to gain more disk space deleting orphans lines (well the attachments on the disk pdf jpeg and so on).
        Thanks for the fix.
        I think i will update with it but also restrict to only emails attachments (where we have our problem when trying to send emails more than one time).
        Thanks again

        Comment


        • #5
          Originally posted by yurikuzn View Post
          Here's the fix: https://github.com/espocrm/espocrm/c...18d676b657e33b/McDVOICE

          You can see what attachments are considered as orphan at Administration > Attachments (in Data panel) > select text filter 'Orphan' (dropdown in the left of the text search input). You can manually remove them from there.
          Thank you so much your site has nice content
          Last edited by FeliciaWhite; 04-24-2020, 12:01 PM.

          Comment

          Working...
          X