Stopping FTP uploads
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Stopping FTP uploads
Does anyone know how to stop FTP uploads initiated with libURLftpUploadFile ?
You can set a callback message, but there is not evident command to stop the FTP session; you normally use CTRL-C when working from terminal, but from Livecode ?
It can be useful if a large upload is in progress and you want to stop it or reset because there was a drop in internet connection (FTP in Livecode seems to detect only server-generated errors; if you or someone else unplug the cable it juts hangs there forever)
You can set a callback message, but there is not evident command to stop the FTP session; you normally use CTRL-C when working from terminal, but from Livecode ?
It can be useful if a large upload is in progress and you want to stop it or reset because there was a drop in internet connection (FTP in Livecode seems to detect only server-generated errors; if you or someone else unplug the cable it juts hangs there forever)
Re: Stopping FTP uploads
Hi,
This cancels the upload:
where myFtpUrl contains an URL starting with "ftp://".
Mark
This cancels the upload:
Code: Select all
unload URL myFtpUrl
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: Stopping FTP uploads
Great, thanks a lot !!
Re: Stopping FTP uploads
Hey,
How can I cancel a download on a mobile device? For other platforms 'unload' and 'resetAll' seem to be the trick, but neither of those are supported for mobile (according to the Dictionary).
Regards,
Jaimee
How can I cancel a download on a mobile device? For other platforms 'unload' and 'resetAll' seem to be the trick, but neither of those are supported for mobile (according to the Dictionary).
Regards,
Jaimee
Re: Stopping FTP uploads
Hello,
I am building an FTP uploader app and tried the unload URL script shown above but it doesn't seem to stop an upload in progress.
Can anyone explain further how this is supposed to work? Script examples?
New to LC.
Thanks,
Jon
I am building an FTP uploader app and tried the unload URL script shown above but it doesn't seem to stop an upload in progress.
Can anyone explain further how this is supposed to work? Script examples?
New to LC.
Thanks,
Jon
-
- VIP Livecode Opensource Backer
- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
- Location: Palo Alto
Re: Stopping FTP uploads
Hi Jon,
Try the resetAll
as long as you are not talking about mobile.
Simon
Try the resetAll
as long as you are not talking about mobile.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Stopping FTP uploads
Hi Simon,
I'd be grateful for a script example.
Thank you so much,
Jon
I'd be grateful for a script example.
Thank you so much,
Jon
-
- VIP Livecode Opensource Backer
- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
- Location: Palo Alto
Re: Stopping FTP uploads
Hi Jon,
The Dictionary is your best friend
But an if/then check can be useful to check for a specific socket and then you'd "close socket" so only one gets closed. (see the Dictionary)
Simon
The Dictionary is your best friend
Now if you examine that you'll see that you don't really need anything more than resetAll, the rest is all if...then.Examples:
if the openSockets is not empty then resetAll
Code: Select all
on mouseUp
resetAll
end mouseUp
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Stopping FTP uploads
Thank you, Simon!
The resetAll function did the trick. Strange that the unload URL didn't.
Thanks again!
Jon
The resetAll function did the trick. Strange that the unload URL didn't.
Thanks again!
Jon
-
- VIP Livecode Opensource Backer
- Posts: 7237
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Stopping FTP uploads
Unload URL removes a downloaded file from RAM. It doesn't apply to uploading.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com