Page 1 of 1

I can not get ftp to work on android

Posted: Mon Jun 16, 2014 9:50 am
by Peter@multidesk.se
Has anyone figured out why a ftp call that otherwise works on iOS, does not work on android?

I have wrestled with this problem enough hours and are now stuck.

set the defaultfolder to specialfolderpath("documents")
put URL("binfile:" & "./" & "tempic222" ) into myDock
put "ftp://USER:PASS@88.111.222.99/SSIn/Uid" into myFtpUpload
replace "Uid" with myGuid & "_Sign.png" in myFtpUpload
put myDock into URL myFtpUpload
if the result is not empty then
answer the result
end if

best regards,

Peter

Re: I can not get ftp to work on android

Posted: Mon Jun 16, 2014 7:59 pm
by Simon
Hi Peter,
This does not look correct:
("binfile:" & "./" & "tempic222" )
Should only be a slash. Sometimes an OS will overlook discrepancy's.

Simon
Edit: oops http://quality.runrev.com/show_bug.cgi?id=11779
Still not fixed.

Re: I can not get ftp to work on android

Posted: Mon Jun 16, 2014 11:21 pm
by FourthWorld
Simon wrote:Hi Peter,
This does not look correct:
("binfile:" & "./" & "tempic222" )
Why break it up into three literals when it could be one?:

Code: Select all

("binfile:./tempic222" ) 
Also, unless this is for your own personal use you may want to replace the FTP call with a call to a CGI that handles file uploads. FTP sends login credentials in plain text, so anyone using the app (or any interloper) could see the network stream and get control over that account on your server.

Re: I can not get ftp to work on android

Posted: Mon Jun 16, 2014 11:52 pm
by Simon

Re: I can not get ftp to work on android

Posted: Wed Jun 18, 2014 1:07 am
by Simon
And not to encourage you to use FTP but the workaround for QC problem I believe is to URLEncode your username and login information.

Simon

Re: I can not get ftp to work on android

Posted: Wed Jun 18, 2014 11:07 am
by shawnblc
FourthWorld wrote: Also, unless this is for your own personal use you may want to replace the FTP call with a call to a CGI that handles file uploads. FTP sends login credentials in plain text, so anyone using the app (or any interloper) could see the network stream and get control over that account on your server.
Could you also have the stack (local) call another stack that's located in a directory on a server? Would that help prevent your FTP login credentials from potentially being seen?

Re: I can not get ftp to work on android

Posted: Sun Jun 29, 2014 9:02 am
by Peter@multidesk.se
Is it so, that FTP does not work on android and I have to use CGI for this? I read on the forum that if it works in the development environment, it is almost certainly wrong in the stand-alone settings. I've tried everything I can think of, but nothing gives results.
It works on my mac
it works on my ipad
it does not work on my HTC
Unfortunately, in this case, Android is the platform that must function.

Code: Select all

on myFTPsign
   
   put "ftp://"& FTPUSER & ":" & FTPPASS & "@" & FTPHOST & "/" & SSIn & "/" & tFileName into myFtpUpload
   replace "tFileName" with myGuid & "_Sign.png" in myFtpUpload
   put myPic into URL myFtpUpload --This is where it gets stuck
 if the result is not empty 
then
   answer the result
     exit to top
   else
      end if
      
end myFTPsign
Grateful for any assistance

/ / / Peter

Re: I can not get ftp to work on android

Posted: Sun Jun 29, 2014 3:13 pm
by FourthWorld
shawnblc wrote:
FourthWorld wrote: Also, unless this is for your own personal use you may want to replace the FTP call with a call to a CGI that handles file uploads. FTP sends login credentials in plain text, so anyone using the app (or any interloper) could see the network stream and get control over that account on your server.
Could you also have the stack (local) call another stack that's located in a directory on a server? Would that help prevent your FTP login credentials from potentially being seen?
What do you mean by "call"? Do you mean "download", or "send a message to", or something else?

Re: I can not get ftp to work on android

Posted: Sun Jun 29, 2014 9:15 pm
by Simon
Hi Peter,
As long as there is no "@" in your username then it works.

Simon

Re: I can not get ftp to work on android

Posted: Sun Jun 29, 2014 10:21 pm
by jacque
You might also try url encoding the user name and password:

put urlEncode(ftpuser) into ftpuser
put urlEncode(ftppass) into ftppass