In the app tap on "New Report",
then chose one of the categories (this opens the page "Collect"),
then tap the camera symbol and make a picture (this uses the restservice "mobilecamera"),
then tap send (this uses the restservice "restservice_newPOI_post"
In API Express you can go to
reporterAPI == reporter_newPOI==newPOI
and test the service with some dummy data for the body payload.
In the example below the "11111......111" dummy data has a size of 10KB only!
I you increase the dummy data to a certain extent the error is thrown.
We've reproduced that issue.
Please provide us with information to understand what is wrong there: what data type does your column "media_url" have? What database do you use there?
The data type of the column "media_url" is CLOB.
The database is a SQL Server database provided by Microsoft Azure.
Could you create a database connection to your database: https://docs.appery.io/docs/apiexpres...
And send the base64 string there for the parameter media_url, instead of set it manually with a SQL code?
Yes, the database connection works just fine.
I can store other values into other fields without any delay or problem.
I also can copy a base64 string into that database from a GIS software that I use.
The media_url filed does accept the entry without any problems.
Same thing when working with the SQL Server Management Studio.
I can add entries into the media_url field.
You can generate the insert service with that database connection: https://docs.appery.io/docs/apiexpres...
Please check does it work fine for you?
Hi Serhii,
I tried to use that before and double checked today. This is just another way to create the service and won't change how the service itself behaves.
I researched a little bit deeper today and figured that this is probably a problem with the SQL identifiers.
SQL Server requires a single (') identifier for varchar(max) data types in order to push through variables longer than 128 characters.
In SQL Server Management Studio it throws the following error:
The identifier that starts with ... is too long. Maximum length is 128
when using
INSERT INTO [dbo].POI
values(abcd...);
The statement goes through and adds a new record when using
INSERT INTO [dbo].POI
values('abcd...');
Now the question is what does API Express do when using the syntax like :media_url?
Is it transforming :media_url to
a) media_url
b) 'media_url'
c) "media_url"
If it is a) or c), the statement is most likely not to work.
Please, can you ask your development guys to answer that one?
What would be a possible work around?
Thanks,
Bernie
It has been almost two weeks now in trying how to figure out a simple task: How do I store a picture in a Azure SQL server database via API Express.
Do I really need to buy support hours for this?
Serhii,
i need to continue to work on my project.
In order for you to be able to replicate the issue I set up a new project with just one page, the camera device service and the API Express service.
The name of that project bis "Azure" and I shared it with support.
I look forward hearing of you.
Thanks,
Bernie