Page 1 of 3

Retrive image Data URL from Image Component

Posted: Sun Apr 20, 2014 6:24 am
by bahar.wadia

In my App, I am taking pictures (using the camera) that I save to the Image Component (Data URL - format).

Next, I want to be able to retrieve the Data URL from the Image Component.

How do I do that?


Retrive image Data URL from Image Component

Posted: Sun Apr 20, 2014 7:32 am
by Alena Prykhodko

Hello,

Not sure I understand correctly, do you save them to Database?
Here is how to retrieve objects from DB http://docs.appery.io/documentation/b...


Retrive image Data URL from Image Component

Posted: Sun Apr 20, 2014 12:59 pm
by bahar.wadia

When I capture a picture with a camera I directly save it to the Image Component. Now I want to get the Data URL that is stored in the Asset property of the Image Component, using JavaScript.

How do I do that?


Retrive image Data URL from Image Component

Posted: Mon Apr 21, 2014 11:55 am
by bahar.wadia

Any updates?


Retrive image Data URL from Image Component

Posted: Mon Apr 21, 2014 12:49 pm
by Kateryna Grynko

Hi Bahar,

This code returns the image URL by its name, so you can use it:
preAppery.getImagePath("imagename");/pre
You can also try codeAppery('imagename').attr('src')/code to get the image URL.
If you upload image through image Assets you can use relative path: prebackground: url("../image/imagename.jpg");/pre
Here 'imagename' is a name of the image.


Retrive image Data URL from Image Component

Posted: Sat May 17, 2014 5:33 pm
by bahar.wadia

Along similar lines...

How do I get the 'Asset' property of an image component and store in local storage. I know how to do this using Events, but I want to do this with Javascript.

Thanks for your help.


Retrive image Data URL from Image Component

Posted: Mon May 19, 2014 10:07 am
by Evgene Karachevtsev

Hello,

The image component doesn't have "Asset" attribute, but has "src".
You can store this value in local storage with Javascript: localStorage.setItem('src', Appery('imagename').attr('src'));


Retrive image Data URL from Image Component

Posted: Wed May 21, 2014 1:56 am
by bahar.wadia

This work nicely. Thank you


Retrive image Data URL from Image Component

Posted: Mon Oct 06, 2014 7:11 am
by Alex GG

Hi,
In my app, the user can take pictures (using the camera) and save them in Cloudinary. (Cloudinary is an end-to-end image management solution for mobile apps).

With some help of Cloudinary support, I ́ve manage to upload the images.

The URL to one image taken with camera is like this

http://res.cloudinary.com//image/uplo...

I want to retrive the images previously uploaded by users, in another page...

This is what I did:

I created a REST service (but couldnt make it work)

  1. In settings I add in the URL field:
    http://res.cloudinary.com//image/uplo...

  2. method: get

  3. Data type xml

    After that In the image field of the Test tab I put: ji5elmpuh3cpgbrgovcx.jpg

    The Test is successful, but cant created the service response..

    What Im doing wrong?
    How can I retrive those images?

    Regards


Retrive image Data URL from Image Component

Posted: Mon Oct 06, 2014 8:29 am
by Evgene Karachevtsev

Hello Alex,

Sorry, could you please clarify, your link (http://res.cloudinary.com//image/uplo...) does not open, so I don't really understand is this the direct link to the picture or not?