Upload a field using ftp?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
TooManyNotes
Posts: 10
Joined: Fri Nov 16, 2018 2:01 am

Upload a field using ftp?

Post by TooManyNotes » Tue Nov 20, 2018 5:41 pm

I would like to upload a field in my stack. The field is composed of html. I’m using LC 9.0.1 Community version.
I’ve tried everything in the manual and all I get is “error.” Obviously, I’m writing garbage syntax. What is the proper way to ftp an html field to my server?
TIA,
John

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9823
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Upload a field using ftp?

Post by FourthWorld » Tue Nov 20, 2018 6:00 pm

Without seeing the code you're using it will not be possible to advise on how to improve it.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

TooManyNotes
Posts: 10
Joined: Fri Nov 16, 2018 2:01 am

Re: Upload a field using ftp?

Post by TooManyNotes » Tue Nov 20, 2018 6:11 pm

Last piece of code I tried:

ftp;//“host/user:pass(at)host/dummyfile.html”

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9823
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Upload a field using ftp?

Post by FourthWorld » Tue Nov 20, 2018 6:17 pm

Is that the full statement?

And no error checking following it?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

TooManyNotes
Posts: 10
Joined: Fri Nov 16, 2018 2:01 am

Re: Upload a field using ftp?

Post by TooManyNotes » Tue Nov 20, 2018 6:24 pm

Full code:

on opencard — the card where the field dummyfile resides
ftp://host/user:pass@host/dummyfile.html
end opencard

No error checking. I deleted it to see if that was an issue.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9823
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Upload a field using ftp?

Post by FourthWorld » Tue Nov 20, 2018 7:33 pm

That statement is simply a URL. What would you expect it to do? Should LiveCode download it? Should LiveCode upload to it? If the latter, what would it upload?

To get and put data to and from URLs see the "get" and "put" commands in the Dictionary.

Also, depending on the specifics of your app, you may want to reconsider using FTP. Is this an internal tool or for public use?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Klaus
Posts: 13820
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Upload a field using ftp?

Post by Klaus » Tue Nov 20, 2018 7:37 pm

And to see a correct example of the syntax for this, please check the dictionary about -> ftp Keyword

To learn about the very basis of Livecode I strongly recommend to work through these stack:
http://www.hyperactivesw.com/revscriptc ... ences.html

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”