mobilepickPhoto Library

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
jwtea
Posts: 66
Joined: Fri Mar 23, 2018 2:01 am

mobilepickPhoto Library

Post by jwtea »

Hello guys , can i know path of the image which is pick by using mobilepickPhoto Library function??

(My button to upload the image)

Code: Select all

on mousedown
   set the lockloc of the templateimage to true
   set the width of the templateimage to "131"
   set the height of the templateimage to "121"
   set the location of the templateimage to 109,308
   mobilePickPhoto "library"   
   set the name of last image to "myImage"   
end mousedown
I tried this code below but in my fld "imagepath" is it empty.... Anybody know why??

Code: Select all

on mousedown
put the filename of img "myImage" to fld "imagepath
end mousedown
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: mobilepickPhoto Library

Post by Klaus »

Hi jwtea

some hints:
No need to put QUOTES around NUMBERS!
-> set the width of the templateimage to 131
put the filename of img "myImage" to fld "imagepath"
-> put the filename of img "myImage" INTO fld "imagepath"

You do not see the path to the image because "mobilepickphoto" will COPY the user selected image into your stack, so it does not have a filename anymore.


Best

Klaus
jwtea
Posts: 66
Joined: Fri Mar 23, 2018 2:01 am

Re: mobilepickPhoto Library

Post by jwtea »

Hello Klaus , thanks for the tips! :D

The reason why i want the path to the image is because i want to upload the photo that is pick by the mobilepickPhoto Library function to my server ~ ~
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: mobilepickPhoto Library

Post by Klaus »

Do you really need a FILE for that?
jwtea
Posts: 66
Joined: Fri Mar 23, 2018 2:01 am

Re: mobilepickPhoto Library

Post by jwtea »

Hello Klaus , thanks for your responsive reply! 8)

Is there any way to have the file name of the image that is pick by the mobilepickPhoto function??
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: mobilepickPhoto Library

Post by Klaus »

No, sorry.
jwtea
Posts: 66
Joined: Fri Mar 23, 2018 2:01 am

Re: mobilepickPhoto Library

Post by jwtea »

:cry:

So for mobilepickPhoto Library , there is no way i can get the path of the image chosen?
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: mobilepickPhoto Library

Post by Klaus »

NO-HO! 8)

Your message contains 9 characters.
You need to enter at least 10 characters.
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: mobilepickPhoto Library

Post by Klaus »

Please don't shoot the messenger!

This is due to security reasons a.k.a. "Sandboxing", we cannot access the original data of other apps, but this way we can, however not directly.
Post Reply