LuaSocket ftp put: surprising amount of transmission errors

Hello!

Has anybody yet played around with LuaSocket’s ftp *put* feature (which transfers data from an iPhone to an ftp server)?

When using ftp.put on an actual iPhone device over WLAN, I am experiencing an awful lot of transmission errors - while other tools (such as Safari) seem to work fine as usual…

Does anybody else have some experiences in that area?

Kind regards,

Andreas Rozek [import]uid: 4331 topic_id: 851 reply_id: 300851[/import]

I used this code without problem:

local http = require(“socket.ftp”)
local ltn12 = require(“ltn12”)

local File=“hello.png”
local filePath = system.pathForFile( File,system.DocumentsDirectory )

f, e = ftp.put{
host=“myftpserver”,
user=“myusername”,
password=“mypassword”,
argument="/directory/"…File,
source=ltn12.source.file(io.open(filePath,“r”))
}

print(“f:”…f…"\ne:"…e)

bye
pm

[import]uid: 2735 topic_id: 851 reply_id: 1898[/import]

==================================

function mySourceFile(handle )
if handle then
local chunckSize = 4096;
return function()
local chunk = handle:read(chunckSize)
return chunk
end
end
end

==================================
local fileHandle = io.open(path,“r”);

print (path);print (fileName);
f = ftp.put { host = “ftp.foo.com”,
user = theUserName,
password = thePwd,
command = “appe”,
type = “I”,
path = fileName,
source = mySourceFile(fileHandle)
}
fileHandle:close(); [import]uid: 24 topic_id: 851 reply_id: 1906[/import]