Downloading a file using a custom button

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bandtank
    Active Community Member
    • Mar 2017
    • 379

    Downloading a file using a custom button

    Is it possible to send a file to the user after clicking a custom button? In a service class, I create a csv file, which I currently download using ftp from the server. It would be very helpful if the file could be sent through the browser as a download the way reports send exported files, for example. If this is possible, does anyone know how to do it?
  • item
    Active Community Member
    • Mar 2017
    • 1476

    #2
    hi,
    sorry, not understand all (my english) ..
    but donwload a file is just a url : https://xxxx/?entryPoint=download&id=62792d990c10554yy

    so any button can do it.
    do you save your csv as attachment ?

    All downloaded files in espoCRM is saved as attachment ! you request a report, the result is saved as attachment and you receive a link and download the result.
    it's my knowledge, maybe bad
    If you could give the project a star on GitHub. EspoCrm believe our work truly deserves more recognition. Thanks.​

    Comment

    • bandtank
      Active Community Member
      • Mar 2017
      • 379

      #3
      item Thank you for the help. That is not what I was envisioning, but it works and it solves my problem.

      Comment

      • item
        Active Community Member
        • Mar 2017
        • 1476

        #4
        Look the file in attachement, it's a php file, i have renamed as log

        this is a job.. who connect to a ftp server, download file, and put in directory..
        another job work this file and make business.

        downloaded file is 50mg .. never have problem since one years

        i use it for backup crm to another place, i use it for business... so never need human interaction.
        in this sample, doneFile is just for not download many time same field.




        Attached Files
        If you could give the project a star on GitHub. EspoCrm believe our work truly deserves more recognition. Thanks.​

        Comment

        Working...