Is it possible - if yes, please tell me how

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
pixelitodesign
Posts: 5
Joined: Wed Feb 01, 2012 10:25 am

Is it possible - if yes, please tell me how

Post by pixelitodesign » Sat Feb 18, 2012 3:51 pm

I need a simple short stack.

1 button. TAKE PICTURE and the picture should be automatic uploaded to a FTP Server. Is this possible can someone send me such a stack please?

thank you!

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Is it possible - if yes, please tell me how

Post by Mark » Sat Feb 18, 2012 8:29 pm

Hi,

Yes, it is possible and I could make such a stack, but I have little time. I think you can use the put URL command with your FTP address:

Code: Select all

put urlEncode("username") into myUser
put urlEncode("password") into myPass
put myPictureData into url ("ftp://" & myUser & colon & myPass & "@ftp.domain.com")
Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

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

Re: Is it possible - if yes, please tell me how

Post by Jellicle » Sun Feb 19, 2012 1:21 pm

pixelitodesign wrote:I need a simple short stack.
Off the top of my head:

Code: Select all

on takePhoto
    if the environment is "mobile" then
        iPhonePickPhoto "rear camera", 600,800
        if the result = "cancel" then 
            exit takePhoto
        end if
        ask  "Name this photo"
        put it into photoName
        put image (the number of images) into url  ("ftp://username:password@yourdomain.com/photos/"& photoName)   
        delete image (the number of images)
    end if
end takePhoto
Don't forget to create the directory "photos" on your ftp server, and set the right permissions on that directory.
14" MacBook Pro
Former LiveCode developer.
Now recovering.

Post Reply