download and save a file
Richard Gaskin
ambassador at fourthworld.com
Sat May 28 08:16:27 EDT 2011
Francis Nugent Dixon wrote:
> Hi from Beautiful Brittany,
>
> Now I am confused !
>
> As Richard says : It's fun to do it in LiveCode,
> so, even though I use CyberDuck regularly
> (what a beautiful app !), I thought it would be
> fun to write a little stack in LiveCode for Upload
> and Download. After all, "LiveCoding" IS fun !.
> I found documentation on the Internet which
> indicated for an FTP Upload :
>
> put "ftp://" & FTPUSER & ":" & FTPPASS & "@"
> & "ftp.ben.on-rev.com/public_html/" & tFileName into tDestination
> libURLftpUploadFile tFileForUpload, tDestination, "uploadComplete"
>
> This seemed reasonable to me, as CyberDuck uses
> similar parameters.
>
> Now Richard points me to a document which says :
>
> put "ftp://ftp.xxxxxx.com/uploads/" & tFileName into tUrl
> libUrlFtpUploadFile tSourcePath, tUrl, "loadDone"
>
> Does this mean that we have two Upload options :
>
> 1 - Check me for authorization, and Upload if I'm square !
> or
> 2 - Just DO IT !
>
> If this is true, why would I bother with the complications
> of method 1, when I obviously know what I'm doing if
> I use method 2 in a LiveCode app ?
As Björnke pointed out, the two calls are effectively the same in that
you'll need to include your user name and password in the URL as he
showed. It's a standard format so it's worth knowing, used by basic
HTTP authentication and other Internet systems in addition to FTP.
So sure, writing a LiveCode stack to do your FTP is more work and
involves a bit of typing compared to using an off-the-shelf FTP client.
But it's still more fun. :)
I recently came across a note that's been floating around on why some of
us use Linux. If you substitute "Linux" for "LiveCode" as you read it,
it holds up equally well:
--------------------------------------------------------------
Why We Use Linux
We tell people we use Linux because it’s secure, or because it’s free,
because it’s customizable, because it’s open, because it has excellent
community support...
But all of that is just marketing crap. We tell that to non-Linuxers
because they wouldn’t understand the real reason. And when we say those
false reasons enough, we might even start to believe them ourselves.
But deep underneath, the real reason remains.
We use Linux because it’s fun.
It’s fun to tinker with your system. It’s fun to change all the
settings, break the system, then have to go to recovery mode to repair
it. It’s fun to have over a hundred distributions to choose from. It’s
fun to use the command line.
Let me say that again: it’s fun to use the command line.
No wonder non-Linuxers wouldn’t understand.
The point with Linux fans is we use Linux for its own sake. Sure, we
like to get work done. Sure, we like to be secure from viruses. Sure, we
like to save money, but those are only side effects. What we really like
is playing with the system, poking around, and discovering facts about
the software that lies underneath it.
:)
--
Richard Gaskin
Fourth World
LiveCode training and consulting: http://www.fourthworld.com
Webzine for LiveCode developers: http://www.LiveCodeJournal.com
LiveCode Journal blog: http://LiveCodejournal.com/blog.irv
More information about the use-livecode
mailing list