20.03.2024, 08:28
Hi all,
same problem here with FTPS, file uploaded but 0 K
FTP upload error: closed
HW: LM5 Lite (i.MX6)
SW: 20230607
Any tips?
same problem here with FTPS, file uploaded but 0 K
FTP upload error: closed
HW: LM5 Lite (i.MX6)
SW: 20230607
Any tips?
Code:
host = 'xxx'
user = 'xxx'
pass = 'xxx'
path = '/backup' .. os.date('%Y-%m-%d') .. '.gz'
ftp = require('socket.ftp')
ltn12 = require('ltn12')
webrequest = require('webrequest')
data = webrequest('general', 'backup')
res, err = ftp.put({
host = host,
user = user,
password = pass,
secure = true, -- without this: FTP upload error: 530 Non-anonymous sessions must use encryption.
datasecure = true, -- without this: FTP upload error: 522 Data connections must be encrypted.
type = "a", -- no luck with type = "a" or type = "i"
argument = path,
source = ltn12.source.string(data)
})
if not res then
alert('FTP upload error: %s', tostring(err))
end