Page 1 of 1

Upload a field using ftp?

Posted: Tue Nov 20, 2018 5:41 pm
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

Re: Upload a field using ftp?

Posted: Tue Nov 20, 2018 6:00 pm
by FourthWorld
Without seeing the code you're using it will not be possible to advise on how to improve it.

Re: Upload a field using ftp?

Posted: Tue Nov 20, 2018 6:11 pm
by TooManyNotes
Last piece of code I tried:

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

Re: Upload a field using ftp?

Posted: Tue Nov 20, 2018 6:17 pm
by FourthWorld
Is that the full statement?

And no error checking following it?

Re: Upload a field using ftp?

Posted: Tue Nov 20, 2018 6:24 pm
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.

Re: Upload a field using ftp?

Posted: Tue Nov 20, 2018 7:33 pm
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?

Re: Upload a field using ftp?

Posted: Tue Nov 20, 2018 7:37 pm
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