4 Replies Latest reply on Jun 14, 2017 9:47 AM by mcguirk

    FTP via Insert from URL


      Has anyone successfully used Insert from URL to transfer a file via ftp/ftps as shown in Example 4 here?



      I have an ftp server setup, and am able to use curl via the command line to transfer a file with:

      curl -T /Users/andywalz/Desktop/Capture.png ftp://My-Mac-Mini-Server.local --user myusername:mypassword


      However when I move the same file into a container field and use:

      Set Variable [ $file ; Value: table::container ]

      Insert from URL [With dialog: Off; $$results ;


      "--user myusername:mypassword --upload-file $file

      --header \"Content-type: image/png\""]


      I get "[1627] Authentication Failed" every time. I've tried with other ftps servers as well with same result. What am I missing?



        • 1. Re: FTP via Insert from URL

          First I could suggest using MBS FileMaker Plugin instead with much more CURL features.


          But for now I would suggest to pass user name and password in two options to avoid problems with : in the password. Also the header give is for HTTP and not helping for FTP. Next the URL must contain the destination file name and ftp:// without s is not secure. I prefer sftp:// URLs.

          And you may want to get the debug log from the transfer to read error messages.

          • 2. Re: FTP via Insert from URL

            Thanks for the feedback, I'm specifically preparing a demo of new native FileMaker 16 features so I'm not able to use MBS plugin, though I know it is very capable.


            I don't think FM 16 supports an option for separate password, at least I'm not seeing it listed in the documentation. I do see now the example uses an http url however the documentation does say ftp and ftps are supported. I'm also aware that ftp is not secure. I spun up this ftp server simply for testing this new feature using lowest common denominator. How does one access the debug log you reference?

            • 3. Re: FTP via Insert from URL

              Even though the documentation says "The filename on the server will be the same as the filename in the container field," adding a filename to the end of the url does seem to have made it work.


              Insert from URL [With dialog: Off; $$results ;

              "ftp://My-Mac-Mini-Server.local/" & GetContainerAttribute(table::container;"filename"); ...


              Thanks again Christian

              • 4. Re: FTP via Insert from URL

                I believe the format is:  "FTP:myusername:mypassword@My-Mac-Mini_Server/Filename.CSV"


                In my case, I used the URL number


                But I do have a problem when I use this in version Go 16, it no long works.

                So I guessing it has something to do with cURL.


                Other thinks to watch is if you are on a Linux server, they are case specific. For example, I would think capitalizing "FTP" could break it too.