I want to store an image captured with the phone cam in a SQL Server database.
Simply mapping the image asset to the SQL Server database filed does not do the trick.
Any suggestions are welcome.
I want to store an image captured with the phone cam in a SQL Server database.
Simply mapping the image asset to the SQL Server database filed does not do the trick.
Any suggestions are welcome.
Hi Bernie,
I could be wrong however I'm not sure that this would be any different than going to the Appery database.
What we always do one retrieving an image from the camera or any other source... Is to map it to two places... First... To the image on the UI and second to local storage.
Then... Upon updating the database or inserting a new record... We always retrieve the image from local storage as opposed to from the screen element...
Likely you've already tried that but just in case...
Happy Thursday,
Bruce
Bruce,
That is exactly what I did and this works fine when using the Appery database.
Doing the same with a SQL Server database does not work in my example though.
Thanks for the comment - sure that will be helpful to others one day.
Thanks for the quick reply... So during your update... Does your SQL server database respond with an error?
I.e. I Assume you have 'on error' JavaScript that captures the error and gives you adequate information to debug from a Chrome debugging session ....
When I test the API service with an image base64 string I get
{
"code": "AE009",
"message": "Connection reset",
"status": "BAD_REQUEST"
}
It seems to be a time out issue. I just tuned down the quality and the picture size of the camera and it worked. Any idea on where to jack up the time out?
In general... Timeouts on the Appery platform... Are controlled by your subscription level... The more you pay per month the longer your time out period is.
I guess the question is is there anyway to optimize your insert statement on your SQL Server database?
Alternatively... The question really becomes is the database timing out or is Appery's API express timing out?
Any suggestions from Appery.io in regards of shrinking an image base64 string prior to storing it in the database?
Hello Bernie,
You are right, it might be a timeout issue. In that case you have to reduce a size of your image before send it to the server or improve the speed of your database server.