Announcement

Collapse
No announcement yet.

Button to download all attachments files

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

  • Button to download all attachments files

    Hello,
    In version 5.1.2, I used an extension written by my friend, which allowed me to download all attached files as .zip file.
    This was very helpful when several files were attached and you didn't have to download each file separately.

    I'm attaching link to an extension, maybe someone will be able to adapt it to the latest version 7.3​:

  • #2
    Hi,

    I'll try to see if I can do anything.

    Working on it:
    Click image for larger version

Name:	image.png
Views:	472
Size:	6.5 KB
ID:	90332
    Last edited by Kharg; 04-05-2023, 09:42 PM.

    Comment


    • #3
      Cool. Good luck Kharg!

      In the meantime and ever since I start using EspoCRM, for many documents I just download it through a browser extension (DownThemAll). I probably will continue using it even if this extension get added because it ZIP the file doesn't it?

      Which is good for certain circumstance but not always.

      Comment


      • #4
        esforim I think it could be made into an option whether to zip all files or download them as they are.
        But then the browser may block it if the page sends too many downloads.
        I'll be experimenting.

        Extension is almost completed, I will just try to see if I can implement mass downloads without zipping before releasing.

        ShulzR Extension released https://github.com/Kharg/download-al...eleases/latest
        Last edited by Kharg; 04-07-2023, 03:13 AM.

        Comment


        • #5
          Thank you Kharg !

          Unfortunately, when I try to download attachments, I get the following error:

          HTML Code:
          [2023-04-11 08:56:23] ERROR: (0) Could not get stream for non-existing 'data/upload/60375cb0796da782b'.; GET /; line: 86, file: /var/www/xxx.com/htdocs/espo/espocrm-test/application/Espo/Core/FileStorage/Storages/EspoUploadDir.php [] []
          [2023-04-11 08:56:28] ERROR: Uncaught Exception Error: "Call to undefined function Espo\Modules\DownloadAllAttachments\EntryPoints\finfo_open()" at /var/www/xxx.com/htdocs/espo/espocrm-test/application/Espo/Modules/DownloadAllAttachments/EntryPoints/DownloadAll.php line 67 {"exception":"[object] (Error(code: 0): Call to undefined function Espo\\Modules\\DownloadAllAttachments\\EntryPoints\\finfo_open() at /var/www/xxx.com/htdocs/espo/espocrm-test/application/Espo/Modules/DownloadAllAttachments/EntryPoints/DownloadAll.php:67)"} []

          Comment


          • Kharg
            Kharg commented
            Editing a comment
            You have to enable the php_fileinfo extension from your hosting settings.

        • #6
          Now it works! Thank you Kharg so much!

          Comment


          • Kharg
            Kharg commented
            Editing a comment
            Perfect! Keep an eye out for updates!

        • #7
          Kharg Would it be possible to extend the functionality to download attachments also attached to the Stream?

          Comment


          • #8
            ShulzR Hi, it already does that.

            You just have to enable the option in settings

            Click image for larger version

Name:	image.png
Views:	524
Size:	32.1 KB
ID:	93081

            Comment


            • #9
              Originally posted by Kharg View Post
              ShulzR Hi, it already does that.

              You just have to enable the option in settings

              Click image for larger version

Name:	image.png
Views:	524
Size:	32.1 KB
ID:	93081
              Thank you!

              Comment


              • #10
                Originally posted by Kharg View Post
                esforim I think it could be made into an option whether to zip all files or download them as they are.
                But then the browser may block it if the page sends too many downloads.
                I'll be experimenting.

                Extension is almost completed, I will just try to see if I can implement mass downloads without zipping before releasing.

                ShulzR Extension released https://github.com/Kharg/download-al...eleases/latest
                Hi. That is really great. Thank you very much

                Is there a way to use that to generate a link to send via mail to someone, to download the zip, with a formula?

                Comment


                • Emmker
                  Emmker commented
                  Editing a comment
                  Because the user could have uploaded as many images as he wants, and that would render the email unsendable.

                • esforim
                  esforim commented
                  Editing a comment
                  The answer is no.

                  You can try to use the Public Attachment extension. There is a free and paid version.

                • Kharg
                  Kharg commented
                  Editing a comment
                  Or you could just add noauth to the entrypoint in the extension so that the link can be accessed without login.

              • #11
                How to install the package? When trying to upload it on the Extensions field, it won't recognize it as an installation package

                Comment


                • shalmaxb
                  shalmaxb commented
                  Editing a comment
                  unpack the downloaded zip, enter the folder and zip the folders files, script and the manifest.json into a zip, which then will be installable.
                  Obs., that you mark the mentioned folders and the file all together and then zip them.

                • Kharg
                  Kharg commented
                  Editing a comment
                  You will find the packaged extension in the releases section.
              Working...
              X