Page 1 of 1

FTP Upload

Posted: Sun Feb 26, 2012 7:55 am
by Kevin
What does it mean with the error from a ftp upload return the name of the host? For example, if put x into url "ftp://user:password@abc.com/file.txt" "the result" is 'abc.com'. The same identical code will execute on Windows and Linux without failure. I have read the release notes. I am fully aware that they state that Android is much more stricter than previous platforms. To that end I have check and rechecked my credentials they are coded as shown below. I have also tried both the server name abc.com (abc.com is an example) and the physical ip address "ftp://user:password@10.10.10.5/file.txt" (10.10.10.5 is an example) "the result" is '10.10.10.5' each time.

put urlencode("user") & ":" & urlencode("password") into x

Grasping at straws,
Kevin

Re: FTP Upload

Posted: Wed Feb 29, 2012 12:16 am
by Kevin
Has anyone successfully uploaded/downloaded files via FTP and LiveCode? If so I would appreciate any input on the process you can provide.

Re: FTP Upload

Posted: Wed Feb 29, 2012 12:36 am
by Jellicle
Here you seem to be trying to write the contents of a variable to a file on a ftp server:

Code: Select all

put x into url "ftp://user:password@abc.com/file.txt"
But then you ask:

Code: Select all

Has anyone successfully uploaded/downloaded files via FTP and LiveCode? 
So I'm a little confused :) Anyway, this works for me:

Code: Select all

put "hello world" into url  ("ftp://username:password@domain.com/somefolder/"&"hello.txt")   
Note the brackets around the ftp path.

Gerry

Re: FTP Upload

Posted: Wed Feb 29, 2012 1:08 am
by Kevin
You are correct. It is conforting to know someone has it working on Android. Now I just need to find out what the loose nut between the keyboard and chair is doing wrong.

Thanks,
Kevin

Re: FTP Upload

Posted: Wed Feb 29, 2012 8:09 am
by Jellicle
Hmmm my code works on iOS and I've never tried it in android...but I can't imagine why it wouldn't work.

Gerry