This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

FTPS example
#25
This is the server side log.

The guy who manages the FTP server didn't give me much information but it seems that by putting require_ssl_reuse=NO in the vsftpd.conf configuration file and maybe some firewall tweaks, the backup file is entirely transferred but always with this error: 426 Failure reading network stream.

Now if I try to send a 2 MB .csv file with this code, I always get a file truncated to multiples of 8192 and I need advice on how to correctly send a file via FTPS.

thanks for your patience

Code:
-- ...
data = io.readfile('filename.csv')
  path = ('/' .. filename)
  res, err = ftp.put({
  host = host,
  user = user,
  password = pass,
  argument = path,
  type = "a",
  secure = true,
  datasecure = true,
  source = ltn12.source.string(data)
  })

Attached Files Thumbnail(s)
   
Reply


Messages In This Thread
FTPS example - by npinguin - 19.09.2017, 16:23
RE: Sftp example - by Erwin van der Zwart - 19.09.2017, 18:56
RE: Sftp example - by npinguin - 20.09.2017, 18:30
RE: Sftp example - by admin - 21.09.2017, 14:24
RE: Sftp example - by npinguin - 21.09.2017, 15:45
RE: Sftp example - by admin - 22.09.2017, 10:31
RE: Sftp example - by npinguin - 22.09.2017, 14:11
RE: FTPS example - by admin - 22.09.2017, 15:26
RE: FTPS example - by admin - 25.09.2017, 11:29
RE: FTPS example - by npinguin - 25.09.2017, 18:02
RE: FTPS example - by admin - 26.09.2017, 06:10
RE: FTPS example - by DGrandes - 22.02.2023, 14:37
RE: FTPS example - by admin - 23.02.2023, 06:39
RE: FTPS example - by Kilogica - 13.03.2024, 09:08
RE: FTPS example - by Daniel - 13.03.2024, 09:39
RE: FTPS example - by admin - 13.03.2024, 10:10
RE: FTPS example - by Kilogica - 13.03.2024, 11:27
RE: FTPS example - by Daniel - 13.03.2024, 11:29
RE: FTPS example - by Kilogica - 13.03.2024, 11:47
RE: FTPS example - by Daniel - 13.03.2024, 12:11
RE: FTPS example - by Kilogica - 13.03.2024, 13:51
RE: FTPS example - by ferrim - 20.03.2024, 08:28
RE: FTPS example - by admin - 20.03.2024, 08:34
RE: FTPS example - by ferrim - 20.03.2024, 08:53
RE: FTPS example - by ferrim - 22.03.2024, 08:42
RE: FTPS example - by admin - 22.03.2024, 08:54
RE: FTPS example - by ferrim - 22.03.2024, 09:21

Forum Jump: