bahar.wadia
Posts: 0
Joined: Wed Aug 07, 2013 2:05 am

Retrive image Data URL from Image Component

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?

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Retrive image Data URL from Image Component

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...

bahar.wadia
Posts: 0
Joined: Wed Aug 07, 2013 2:05 am

Retrive image Data URL from Image Component

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?

bahar.wadia
Posts: 0
Joined: Wed Aug 07, 2013 2:05 am

Retrive image Data URL from Image Component

Any updates?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Retrive image Data URL from Image Component

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.

bahar.wadia
Posts: 0
Joined: Wed Aug 07, 2013 2:05 am

Retrive image Data URL from Image Component

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.

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Retrive image Data URL from Image Component

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'));

bahar.wadia
Posts: 0
Joined: Wed Aug 07, 2013 2:05 am

Retrive image Data URL from Image Component

This work nicely. Thank you

Alex GG
Posts: 0
Joined: Thu Nov 14, 2013 11:11 pm

Retrive image Data URL from Image Component

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

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Retrive image Data URL from Image Component

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?

Return to “Issues”