Pointing Uploads to Downloads
Note: This page applies to SFTP Gateway version 2.x. Visit Here for documentation on version 3.x.
Background
When an SFTP user drops a file into the uploads
directory, SFTP Gateway
moves the file to S3, and then deletes it locally.
Your end user may want to verify that their file made it to safely
to S3.
One approach is to point the uploads
destination to a specific S3
location. For example:
s3://<bucket>/robtest/downloads/
SFTP Gateway periodically syncs this location to the
user's downloads
folder, allowing them to verify the contents.
Enable the Downloads folder
Within the admin user interface, click the edit icon for your SFTP user.
Check the box next to Enable Download Directory.
This will automatically create the following folder in S3:
s3://<bucket>/<user>/downloads/
Set the Uploads destination
Still within the admin user interface, set the Upload Destination Prefix to the following:
<user>/downloads
(Replace <user>
with your username, i.e. robtest/downloads
)
Scroll to the bottom and click Save.
Testing
SFTP a test file to the user's uploads
directory. After a few moments,
this file should disappear as it gets moved to S3.
Wait 5 minutes for the download sync process to run. Alternatively, you can SSH into the VM and run the following command:
sudo s3sync
If all went well, you should see your test file in the user's
downloads
directory from your SFTP client.