Upload a video to a server from ios with ftp

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Nana
Posts: 38
Joined: Sat Aug 11, 2012 8:01 pm

Upload a video to a server from ios with ftp

Post by Nana » Tue Dec 03, 2013 8:42 pm

Hi,

I am trying to upload a video from an iOS mobile device to my server via ftp. Is there anyone who accomplish to do this with a script which works correct?

If anyone can help me to do it right it would be very appreciated because all the scripts that I tried to write failed.

Thanks in advance.

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Upload a video to a server from ios with ftp

Post by Klaus » Tue Dec 03, 2013 8:45 pm

Hi Nana,

please post some of your scripts, that don't work.


Best

Klaus

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Upload a video to a server from ios with ftp

Post by FourthWorld » Wed Dec 04, 2013 12:32 am

If the video is intended for public use FTP may be okay and should work well from LiveCode.

But FTP is notoriously insecure, so it's good to heed Apple's advice on that:
FTP — Anonymous FTP is an acceptable way to download publicly-visible files. However, you should avoid any other use of FTP like the plague. Specifically, authenticated FTP will send your user's password in plaintext on the wire. This is not acceptable on the modern Internet. Moreover, all forms of FTP send the data in the clear, which is not appropriate for any user data.
https://developer.apple.com/library/ios ... index.html
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Nana
Posts: 38
Joined: Sat Aug 11, 2012 8:01 pm

Re: Upload a video to a server from ios with ftp

Post by Nana » Thu Dec 05, 2013 3:44 pm

I used the code below in order to upload images,text in my server.
Although i got message "Success" on both Android-iPhone devices, the image is uploaded to the server ONLY from the Android device and NOT from the iphone.

Also another message "Contacted" appears in Android device before "Success" message. That
means that the ftp server responded back?

What is going on with ftp on iOS?


"on touchEnd pid
mobilePickPhoto "library"
if it is "cancel" then exit touchEnd

answer "hello"
--put last image into URL theURL
put last image into URL ("ftp://username:password@server.com/myimage.jpg")
answer "hola"
answer the result
if the result <>empty then
answer "url put failed:" && the result
--hide group "progress"
else
answer "success!"
end if

end touchEnd"

Post Reply