FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV Mobile 2024
→
[WM22] a question about FTP transfert
[WM22] a question about FTP transfert
Débuté par VEGEboss, 29 mar. 2018 17:21 - Aucune réponse
Connectez-vous…
VEGEboss
#1
Membre enregistré
88 messages
Popularité : +2 (2 votes)
Posté le 29 mars 2018 - 17:21
please consider this portion of code, wrote to send ALL the files
found in a folder to a FTP server. very easy. ther's a "debug" call
to the "Info" function that shows the good (or not) result of the
operation
MyFTP
is int
FTPresult
is boolean
MyFTP
=
FTPConnect
(
<
site
>
, <
user
>
, <
password
>
,
bla bla bla
)
IF
MyFTP
= -
1
THEN
Info
(
"FTP Connection not available. Try later!"
)
ELSE
FTPresult
=
FTPSend
(
MyFTP
, <
path
>
, <
ftp site
>
", myGauge)
Info(FTPresult)
FTPresult = FTPDisconnect(MyFTP)
END
and a Local procedure to see the progress of the transmission
Procedure
myGauge
(
n
Total
,
n
Current
)
ToastDisplay
(
NumToString
(
n
Current
/
n
Total
*
100
,
"3,2f"
) +
"%"
,
toastShort
,
vaTop
,
haCenter
)
RESULT
True
thanks to the "myGauge" procedure call, I can show to the user the
progress of the FTP work, BUT I read the result = 100% (with the Info) BEFORE the transmission
REALLY ends. e.g.: the gauge still says "50%" and the info shows me the value of the FTPresult
variable to true, and the gauge still runs.
I'm monitoring the files arrived on the server and I can see that NOT ALL the files
are finished, so I think that the FTPSend works "asyncronous" and result as finished (and
gives me back the control to the app) BEFORE the send is really completed
now, the question: how can I know if a FTP Connection is working?
Signaler
0
0
→ Revenir à WINDEV Mobile 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte