Deki
Posts: 0
Joined: Tue Apr 15, 2014 4:53 pm

Retrieve photo from database not working

Hello,

I completed the a href="http://docs.appery.io/tutorials/using-t ... component/ " rel="nofollow"tutorial/a about using a camera in an application, however I am having issues with retrieving the photo from the database.

Steps Taken
1) the button that starts the camera works just fine. I am able to start the camera, take a picture and approve the picture using the checkmark

2) once the picture is approved by me it shows up in the image in the app. great so far!

3) however, the problem arises when I click on the second button "savedbutton" in the app. This button is supposed to invoke the create_service and list_service as described in the tutorial. The only thing I get when I click it is the name "Label" in the label component inside the list component. When I click the button multiple times I get multiples of the world 'Label' like this --- "LabelLabelLabel"

Any help would be greatly appreciated.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Retrieve photo from database not working

Hello!

Could you post screenshot of mapping for create_service?

Deki
Posts: 0
Joined: Tue Apr 15, 2014 4:53 pm

Retrieve photo from database not working

Here you go Marina

Image

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Retrieve photo from database not working

Looks like mapping is wrong because in this case there are all photo names from DB in this list shown. You need input field where you can enter photo name. This field name you would need to map to DB name field.

Deki
Posts: 0
Joined: Tue Apr 15, 2014 4:53 pm

Retrieve photo from database not working

Hi Marina, so in this case then is the tutorial wrong? It looks exactly like the tutorial image that you guys have for create_service here http://docs.appery.io/tutorials/using...

Can you please break down the fix you mention into steps - for example 1) do this 2) do that 3) do this

Thanks

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

Retrieve photo from database not working

Hi Deian,

In section 'Working with the database' right after Step 6, map localStorage variable 'photo_buffer' to request parameter of the service that saves data in Database.

Sean Doherty
Posts: 0
Joined: Sun Jan 12, 2014 3:47 am

Retrieve photo from database not working

I am having a problem retrieving the photos from database as well, but it does not produce the "label" error. Instead, nothing happens and the photo is not displayed. Here is the public link, and several screenshots.

http://appery.io/app/mobile-frame?src...

Image

Image

Image

Image

Image

Image

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

Retrieve photo from database not working

Hello Sean,

Could you clarify your problem? As I can see, the first several images in list have an incorrect description (name). They contain base64 string instead of right names.

Sean Doherty
Posts: 0
Joined: Sun Jan 12, 2014 3:47 am

Retrieve photo from database not working

Hello Evgene,

Thank you for your response. The problem is when using the app installed on Android, or through the Appery app tester, in both cases I am able to access the camera component and take a photo, but the photo list does not display on either device after the photo is stored. From my database, it looks like photos are being stored, but they are failing to display through the app on the device. Thank you for catching that these have an incorrect description (name) as well. I did not notice that. Are you able to identify where the issue with that may be? I have gone back over this camera tutorial a few times and I think I've done everything correctly by the instructions there. Thanks so much for your help on this!

http://docs.appery.io/tutorials/using...

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

Retrieve photo from database not working

Apparently, you have a wrong mapping for the list service. Check please, photo should be mapped to list_preview Asset Image

Return to “Issues”