Introducing the Sps-ftpd-driver Gem

require 'sps-ftpd-driver'

driver = SpsFtpdDriver.new(temp_dir='/tmp/')
server = Ftpd::FtpServer.new(driver)
server.start
puts "Server listening on port #{server.bound_port}"
gets

The above script will start an FTP server on an arbitrary port using the /tmp/ directory to store uploaded files. When a file is uploaded, a message is published to the SimplePubSub broker on host 'sps'.

After uploading a file to the FTP server I observed the following SPS message:

test: uploaded file vcard.xml

SPS Options

Resources

Tags:
Source:
1521hrs.txt
Published:
17-02-2015 15:21