Contents
Sometimes it is necessary to use SFTP rather than FTP to communicate with a FTP site. Some FTP sites remove regular FTP access for security reasons and insist on using the more secure SFTP.
Photo Upload uses the third party utility curl to perform internet operations. Both Windows (version 10 and 11 only) and Mac ship with a version of curl, but on both platforms the provided version of curl supports FTP and not SFTP.
If you want to use SFTP then you will need to install a version of curl that is more capable than the platform version.
1. Install an alternative curl
Windows
On Windows you can download a more capable version of curl that includes support for SFTP.
Download curl
The recommended approach is to download the “External binary files for Windows” zip from the Requirements section on the Download & installation page.
Or you can download your own specific version of curl from a website of your choosing.
Install curl
If you’ve downloaded the recommended “External binary files for Windows” zip then simply extract the files from the zip to somewhere permanent, such as the folder where you’ve saved the plug-in, and make a note of this location.
If you’ve chosen to use your own specific version of curl then install it and make a note of the location where you can find the main curl binary file.
Mac
Presumably for security reasons, Mac does not make it easy to use an alternative version of curl.
If you’re a Mac expert then you may have an alternate way to install and use an updated version of curl, but for everyone else, who is comfortable using a terminal prompt, then these are the steps that worked for me.
Install Homebrew
This method described here is using Homebrew as a way to install an updated curl on a Mac. The existing platform version of curl is not overwritten.
To start the install, download and execute the install script from Homebrew by entering the following from a terminal prompt:
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Install Homebrew curl
Enter the following from a terminal prompt:
$ brew install curl
Check the capabilities of Homebrew curl
Enter the following from a terminal prompt:
$ /usr/local/opt/curl/bin/curl --version
You should see something like:
curl 7.74.0 (x86_64-apple-darwin19.6.0) libcurl/7.74.0 (SecureTransport) OpenSSL/1.1.1i zlib/1.2.11 brotli/1.0.9 zstd/1.4.8 libidn2/2.3.0 libssh2/1.9.0 nghttp2/1.42.0 librtmp/2.3
Release-Date: 2020-12-09
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps mqtt pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS brotli GSS-API HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz Metalink MultiSSL NTLM NTLM_WB SPNEGO SSL TLS-SRP UnixSockets zstd
The key piece of information here is the protocol “sftp” included in the “Protocols” line. This means that the version of curl supports using SFTP.
2. Configure the plug-in to use the alternative curl
You next need to configure Photo Upload to use this version of curl.
Use the “Configuration” button to open the plug-in’s Configuration window.
In the “Folder with ‘curl’ binary” setting enter the path to Homebrew curl from earlier, i.e.:
/usr/local/opt/curl/bin/curl
Press OK to save the setting.
3. Test the version of curl used by the plug-in
From within the Configuration window click on the “Test connection” button.
This will show the version of curl being used and whether it appears to be functioning correctly.
In the above screenshot you can see the curl version is 7.74.0.
4. Enter your SFTP site connection details
In the plug-in’s main “Photo Upload – Account” section, click “Connect to FTP” box.
If the plug-in is correctly using curl with SFTP then you will see SFTP included in the example text.