-- Author: Luke
-- Date: 2012-12-13
- Code: Select all
require("luacom")
local queueinfo = luacom.CreateObject("MSMQ.MSMQQueueInfo")
queueinfo.PathName = ".\\private$\\wftpserver"
queueinfo.Label = "Wing FTP Server Queue"
queueinfo:Create()
local queue = queueinfo:Open(2, 0)
if queue ~= nil then
local message = luacom.CreateObject("MSMQ.MSMQMessage")
message.Body = "OnFileUploaded|"..os.date("%Y-%m-%d %H:%M:%S").."|%IP|%Name|%PathName|%FileSize"
message.Label = "File_Uploaded"
message:Send(queue)
end
queue:Close()
You should add the above lua script to the "OnFileUploaded" event for FTP(HTTP,SSH).
Here we used a LuaCOM lib, you must download it then unzip it into the working directory of Wing FTP Server, the download URL: http://www.wftpserver.com/bbsres/libcom.zip