File on folder /data/upload

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • theodoz
    Junior Member
    • Apr 2017
    • 10

    File on folder /data/upload

    I have a question on the files in the folder /data/upload/.
    When i performs a delete action on EspoCRM, the associated file doen't delete on the server.
    I don't have any error on the log.
    Why ?

    What is the role of the crontab clean-up?

    Have a nice day.
  • tarasm
    Super Moderator
    • Mar 2014
    • 573

    #2
    Such files should be deleted via cleanup job.
    Job Offers and Requests

    Comment

    • theodoz
      Junior Member
      • Apr 2017
      • 10

      #3
      The cleanup job is activated every 5 hours (0 */5 * * *).
      I checked the files uploaded on 08 31 2017 in espoCRM, then I deleted in espoCRM. Today the files are always present in the folder /data/upload.
      Have you already had this problem?

      Have a nice day.

      Comment

      • tanya
        Senior Member
        • Jun 2014
        • 4308

        #4
        Hello

        Cleanup Attachments Period = 1 month. On 10 01 2017 you could check if these files exist.

        Thanks. Have a nice day too.

        Comment

        • bruce185
          Member
          • Feb 2016
          • 71

          #5
          Hi guys, so am I correct in assuming that all the files in /data/upload/ can be safely deleted by hand if the cleanup job doesn't automatically remove them?

          Comment

          • tanya
            Senior Member
            • Jun 2014
            • 4308

            #6
            If you know the id of the attachment, you can delete the file after removing the entity safely

            Comment

            • bruce185
              Member
              • Feb 2016
              • 71

              #7
              So what does Espo store in /data/upload and what does it attempt to clean?

              Comment

              • tanya
                Senior Member
                • Jun 2014
                • 4308

                #8
                it delete file physically, that were delete from crm more than 30 days ago. If you delete attachment in crm, it marks it as deleted in data base, but file is available for next 30 days

                Comment

                • bruce185
                  Member
                  • Feb 2016
                  • 71

                  #9
                  Thanks Tanya but what files are supposed to be stored in /data/upload?

                  Comment

                  • khopper
                    Senior Member
                    • Sep 2017
                    • 329

                    #10
                    I have noticed the same thing, I see tons of files, I am sure I have deleted in Espo but looking at the back-end DB I am not seeing it marked as deleted. Help?
                    Attached Files

                    Comment

                    • tanya
                      Senior Member
                      • Jun 2014
                      • 4308

                      #11
                      Check parent_id and parent_type row or related_id row and related_type to find your attachment in system

                      Comment

                      • khopper
                        Senior Member
                        • Sep 2017
                        • 329

                        #12
                        Tanya, In my instance I have over 300 records whit no parent_id, parent_type, related_id or related_type.
                        How do I find them to be able to delete them through the CRM interface or can i just mark them in the DB back end as 1 for deleted that way the clean up job will remove the files?
                        Last edited by khopper; 12-20-2017, 06:14 PM.

                        Comment

                        • spacemnspiff
                          Junior Member
                          • Dec 2017
                          • 3

                          #13
                          All the files in /data / upload / can be deleted by hand? If the cleanup doesn't automatically remove them

                          Comment

                          • tanya
                            Senior Member
                            • Jun 2014
                            • 4308

                            #14
                            khopper application/Espo/Jobs/CleanUp.php cleanupAttachments method. Here you can read the logic of removing attachment. Also check if Clean-Up Job is Active

                            Comment

                            • tanya
                              Senior Member
                              • Jun 2014
                              • 4308

                              #15
                              spacemnspiff of course you can delete it manually. System remove files physically with some delay (application/Espo/Jobs/CleanUp.php cleanupAttachments method)

                              Comment

                              Working...