carlsson Posted April 19, 2019 Posted April 19, 2019 I have exported a PDF that I want to upload to a SFTP Server, but I cannot get it to work. The SFTP server is located at port 2222. File: $filepath FTP Server: ftp.theserver.com User: ftp_user Login: password I was trying with the Insert from URL script step, and specified it as follows: URL: sftp://ftp.tehserver.com:2222 cURL: --upload-file $filepath --user ftp_user:password I get error "Command is unavailable" Have I misunderstood the Insert from URL function or am I doing something else wrong? Thanks, Andreas
MonkeybreadSoftware Posted April 19, 2019 Posted April 19, 2019 For SFTP you need a plugin like the MBS FileMaker Plugin with it's own CURL commands.Â
carlsson Posted April 21, 2019 Author Posted April 21, 2019 Thanks MBS! Didn't realize that FM didn't do SFTP natively. However, I have invested in the plugin from Base Element and will try that out first.
MonkeybreadSoftware Posted April 21, 2019 Posted April 21, 2019 here some example code for MBS Plugin: Set Variable [$curl; Value:MBS("CURL.New")] # FTP URL with destination file name: Set Variable [$result; Value: MBS("CURL.SetOptionURL" ; $curl ; "sftp://12.34.56.78/AZ1677ZZ.jpg")] Set Variable [$result; Value: MBS("CURL.SetOptionUpload" ; $curl ; 1)] Set Variable [$result; Value: MBS("CURL.SetOptionPassword" ; $curl ; "xxx" )] Set Variable [$result; Value: MBS("CURL.SetOptionUsername" ; $curl ; "yyy" )] # Pick file from desktop: // Set Variable [$Desktop; Value: MBS("Folders.UserDesktop")] // Set Variable [$Path; Value: MBS("Path.AddPathComponent"; $desktop; "AZ1677ZZ.jpg")] // Set Variable [$result; Value: MBS( "CURL.OpenInputFile" ; $curl ;$path )] # Pick file from container: Set Variable [$result; Value: MBS( "CURL.SetInputFile" ; $curl ; Test::ImageFileContainer )] # Upload file Set Field [Test::PerformResult; MBS( "CURL.Perform" ; $curl )] Set Field [Test::DebugMessages; MBS( "CURL.GetDebugAsText" ; $curl)] Set Variable [$result; Value:MBS( "CURL.Cleanup" ; $curl )] 1
carlsson Posted April 21, 2019 Author Posted April 21, 2019 Well, since I can’t get the BE plugin to work I’ll probably try this out. Thanks.
jfletch Posted October 11, 2019 Posted October 11, 2019 Christian, I have a solution that uses the desktop version of MBS to do just that and it works as advertised. The issue is that there is a lot of data--with some included Base-64 images--and there are several dozens of files to send over a mediocre internet connection, so the user's FileMaker is locked up for a few HOURS a day in processing these reports. If I get the server license for MBS, will it work properly to send them to a processing queue and then run them with a Server scheduled script? The other option that the client is considering is to buy another computer and run it from there, but that would still tie up resources with all the data slinging back and forth. Suggestions? Jonathan
Wim Decorte Posted October 11, 2019 Posted October 11, 2019 On 4/19/2019 at 2:49 PM, carlsson said: URL: sftp://ftp.tehserver.com:2222 The answer to the original question is that FM expects the format of the protocol part of the URL to be "ftps", not "sftp".... weird but true
jfletch Posted October 11, 2019 Posted October 11, 2019 Wim, but FTPS and SFTP are totally unrelated to each other. How does that work? Is it a bug?
Wim Decorte Posted October 11, 2019 Posted October 11, 2019 Dunno if it is a bug or not but if you look at the help for the "insert from URL" script step, you'll see a list of supported protocols. and FTPS is there but not SFTP (unless I really missed it).
jfletch Posted October 11, 2019 Posted October 11, 2019 9 minutes ago, Wim Decorte said: Dunno if it is a bug or not but if you look at the help for the "insert from URL" script step, you'll see a list of supported protocols. and FTPS is there but not SFTP (unless I really missed it). Yeah, I think that is why I am using MBS. Are you saying that you can access an SFTP server using the FTPS switch in Insert From URL? That would certainly be, as you say, "weird, but true." The protocols are really different. They do transfer files, but the method of encryption and handshaking is really incompatible. I know this because we had to get the client's client to get a whole other FTP Server app just to work with them. FTPS is a bear to work with. I'll stick with Christian's great plugin for the time being.
fmgenius Posted February 4, 2020 Posted February 4, 2020 (edited) On 10/11/2019 at 3:40 PM, Wim Decorte said: The answer to the original question is that FM expects the format of the protocol part of the URL to be "ftps", not "sftp".... weird but true Filemaker natively supports ftps but not sftp. These are 2 different protocols. sftp uses SSH for the connection while ftps uses SSL connection. Edited February 4, 2020 by fmgenius
Recommended Posts
This topic is 1754 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now