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: Klaus, FourthWorld, heatherlaine, kevinmiller

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

Upload a field using ftp?

Post by TooManyNotes »

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: 10105
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Upload a field using ftp?

Post by FourthWorld »

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 »

Last piece of code I tried:

ftp;//“host/user:pass(at)host/dummyfile.html”
FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10105
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Upload a field using ftp?

Post by FourthWorld »

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 »

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: 10105
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Upload a field using ftp?

Post by FourthWorld »

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: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Upload a field using ftp?

Post by Klaus »

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