FTP Upload

The place to discuss anything and everything about running your LiveCode on Android

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

Post Reply
Kevin
Posts: 72
Joined: Fri Oct 02, 2009 3:47 pm

FTP Upload

Post by Kevin » Sun Feb 26, 2012 7:55 am

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

Kevin
Posts: 72
Joined: Fri Oct 02, 2009 3:47 pm

Re: FTP Upload

Post by Kevin » Wed Feb 29, 2012 12:16 am

Has anyone successfully uploaded/downloaded files via FTP and LiveCode? If so I would appreciate any input on the process you can provide.

Jellicle
Posts: 448
Joined: Thu Feb 24, 2011 11:07 am

Re: FTP Upload

Post by Jellicle » Wed Feb 29, 2012 12:36 am

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
27" iMac, 27" Cinema Display, OS X Mavericks
iPhone 5 (plus a bunch of older devices for testing)
LiveCode Commercial license. Developer Program member.

Kevin
Posts: 72
Joined: Fri Oct 02, 2009 3:47 pm

Re: FTP Upload

Post by Kevin » Wed Feb 29, 2012 1:08 am

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

Jellicle
Posts: 448
Joined: Thu Feb 24, 2011 11:07 am

Re: FTP Upload

Post by Jellicle » Wed Feb 29, 2012 8:09 am

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
27" iMac, 27" Cinema Display, OS X Mavericks
iPhone 5 (plus a bunch of older devices for testing)
LiveCode Commercial license. Developer Program member.

Post Reply

Return to “Android Deployment”