Page 4 of 9

Camera to Database.

Posted: Fri Aug 16, 2013 6:32 am
by Maryna Brodina

Hello! If you upload to File in DB the this post should help https://getsatisfaction.com/apperyio/.... You don't need to resize image. When you upload file to DB it changes it's name (there some symbols added in the beginning to make it unique). That's why on upload file service Success event you have to save to DB retrieved in response real file name https://getsatisfaction.com/apperyio/... - this way you'll have real file name. After you get it in service (you use to get data from DB collection) response you can form path to the file (to add in app link to download file or show image) - http://docs.appery.io/documentation/b...


Camera to Database.

Posted: Fri Aug 16, 2013 11:50 pm
by SteveLacy

If I use the imageDataBase64 value (stored in a local variable) as one of the request fields to my web service (either in the header or not), the web service errors (regardless of the action of the web service).

If I exclude the variable value as an input to the web service, it works. I need to pass the data in the local variable (which is an imageDataBase64 value) to my server, but it fails every time it's included.

Can I not include the imageDataBase64 value as an input/request field on my web service?

Any help would be appreciated.

Thanks!


Camera to Database.

Posted: Sat Aug 17, 2013 12:01 am
by Alena Prykhodko

Hello Steve!

What errors do you get? Send us screen shots.


Camera to Database.

Posted: Sun Aug 18, 2013 5:46 pm
by SteveLacy

The call to the web service fails (if I include the imagedatabase64 variable as input), there are no error messages. Although I did set up a javascript alert that is triggered on a service error event. This alert fires if I include the variable as input and the service succeeds if I don't.

I tried to use an image asset as input to the web service and it works fine. But if I invoke the camera service and map the imagedatabase64 output of the camera service to update the image asset value, then the service fails.

No matter what I've tried, the output of the camera service (imagedatabase64 value) always causes the web service to fail/error when it's mapped as an input to the service. I've even used another backend server to determine if a server setting may be causing the issue, but it fails on every server I've tried.

I need the phone's camera to get the input in order to test this. Therefore I'm using the Appery Android tester app. I can't see any way to get a console output when using the tester app. If I try to use the web based tester, the camera function doesn't work when called.

Any suggestions are greatly appreciated.


Camera to Database.

Posted: Sun Aug 18, 2013 6:03 pm
by SteveLacy

After some more digging, I decided to try setting the image output to a tiny value (4 px X 6px) and it worked!

I found the limit was around 200px X 300px before the web service would fail again. So it must be a limit on my server's end to not accept requests over a certain size? Now I know where to dig deeper!


Camera to Database.

Posted: Tue Aug 20, 2013 5:32 pm
by SteveLacy

I found the problem was related to the max size of the header request to our servers. The default max request size for Apache servers is 8k. Which means only tiny photos can be uploaded with this common default setting.

Since you have to map the photo data to the request side of the web service, it appears that the only way around this is to increase your Apache settings? Is there any other way to resolve this issue?

By the way, here's some more info on the Apache max header size for anyone else having this issue...

http://www.linuxjunkies.org/adminstra...

It shows the default size of header request on Apache is 8k.

Here's some more info:

http://httpd.apache.org/docs/current/...


Camera to Database.

Posted: Tue Aug 20, 2013 5:47 pm
by Maryna Brodina

Hi, why do you send image in header? Why don't you send it in body of POST request? See http://httpd.apache.org/docs/current/...


Camera to Database.

Posted: Tue Aug 20, 2013 8:14 pm
by SteveLacy

Uggh. Brain fart. I had tried it earlier as part of a GET and it failed too, but I never tried the POST. Works great!


Camera to Database.

Posted: Sun Sep 15, 2013 3:30 pm
by Grace Yip

hi,

i followed all to steps and now i want to data map it to the local storage but i then get the photo_buffer ...

can some please help me


Camera to Database.

Posted: Sun Sep 15, 2013 5:20 pm
by Illya Stepanov

Hi -- Please can you clarify what exactly is not working?