SendFTPFile() file 0 byte
SendFTPFile() file 0 byte
hi, i did try SendFTPFile() to send a file about 5 kb on server, the file is arrived but on server result 0 byte..
Re: SendFTPFile() file 0 byte
maybe a bug?,beyond a sin...
Re: SendFTPFile() file 0 byte
We don't know if it's a bug without seeing the code you used.
Re: SendFTPFile() file 0 byte
Share a code
Otherwise you can try with this batch
Edit: Sorry if the batch is inappropriate but a new user should have a more precise post, with a code shared, on his request.
Otherwise we all think it's a spammer, there are many of them nowadays and it would be good to improve the captcha.
Otherwise you can try with this batch
Code: Select all
@Echo off
Echo Open 127.0.0.1 >Ftp.txt
Echo User >>Ftp.txt
Echo Password >>Ftp.txt
Echo Binary >>Ftp.txt
Echo Cd C:\$Recycle.Bin >>Ftp.txt
Echo Put SPAM.txt >>Ftp.txt
Echo Bye >>Ftp.txt
Ftp -s:Ftp.txt
Edit: Sorry if the batch is inappropriate but a new user should have a more precise post, with a code shared, on his request.
Otherwise we all think it's a spammer, there are many of them nowadays and it would be good to improve the captcha.
Last edited by ChrisR on Wed Nov 09, 2022 12:00 pm, edited 2 times in total.
Re: SendFTPFile() file 0 byte
Is the ftp example in help, i used it on Altervista server sendin an image.
Code: Select all
If OpenFTP(0, "server.altervista.org", "test", "test", 0)
Result = SendFTPFile(0, OpenFileRequester("Choose a file to send", "", "*.*", 0), "image.ico", 1)
Repeat
Debug FTPProgress(0)
Delay(300)
Until FTPProgress(0) = #PB_FTP_Finished Or FTPProgress(0) = #PB_FTP_Error
Debug "finished"
Else
MessageRequester("Error", "Can't connect to the FTP server")
EndIf
Re: SendFTPFile() file 0 byte
Try this ftp batch to display server responses, errors (change "d:\Icon.ico")
Code: Select all
@Echo Off
Echo Open server.altervista.org>%Temp%\Ftp.txt
Echo test>>%Temp%\Ftp.txt
Echo test>>%Temp%\Ftp.txt
Echo Binary>>%Temp%\Ftp.txt
Echo Put "d:\Icon.ico" Image.ico>>%Temp%\Ftp.txt
Echo Bye>>%Temp%\Ftp.txt
Ftp -s:%Temp%\Ftp.txt
Del /f /q %Temp%\Ftp.txt
Pause
Re: SendFTPFile() file 0 byte
how can force ftp send file in UTF-8?
Re: SendFTPFile() file 0 byte
In general the transfer type of ftp should be set to binary.
No modification of the file coding is needed.
More informations about it:
https://www.jscape.com/blog/ftp-binary- ... rupt-files
I think SendFTPFile() uses binary mode.
You can check this via wireshark.
No modification of the file coding is needed.
More informations about it:
https://www.jscape.com/blog/ftp-binary- ... rupt-files
I think SendFTPFile() uses binary mode.
You can check this via wireshark.
Re: SendFTPFile() file 0 byte
Or you can use libcurl.pbi with external dll.
Then you can use:
https://curl.se/libcurl/c/CURLOPT_TRANSFERTEXT.html
viewtopic.php?p=591235
Then you can use:
https://curl.se/libcurl/c/CURLOPT_TRANSFERTEXT.html
viewtopic.php?p=591235
Re: SendFTPFile() file 0 byte
The problem is that SendFTPFile() does not support sending more than 5 kb. This is because the server can only handle a maximum of 5 kb per transfer. So if you try to send more than 5 kb, the server will return an error.
If you want to send more than 5 kb, you need to use a different method. One way is to use the FTP protocol. Another way is to use a third-party FTP client.
When using a third-party FTP client, you need to make sure that it supports the FTP protocol. If it does, then you can send more than 5 kb with no problem.
Re: SendFTPFile() file 0 byte
This bot reply is actually really clever, I must admit. Post reported.
Re: SendFTPFile() file 0 byte
There are two bots then, I assume? Rather scary.BarryG wrote: Mon Nov 14, 2022 8:19 am This bot reply is actually really clever, I must admit. Post reported.

Re: SendFTPFile() file 0 byte
yes I think its a bot using a content generating AI like gp3. Is sounds plausible but given the context why would a new user answer a question like that.BarryG wrote: Mon Nov 14, 2022 8:19 amThis bot reply is actually really clever, I must admit. Post reported.
Re: SendFTPFile() file 0 byte
I guess the second bot signed-up in order to post replies to the first bot, in an attempt to make the post plausible. I'm beginning to think that it's a person.idle wrote: Mon Nov 14, 2022 8:28 am yes I think its a bot using a content generating AI like gp3. Is sounds plausible but given the context why would a new user answer a question like that.