File Upload using Cordova App

Anyone have experience using file input field with Cordova app.

Form insert/Update is fine but I get this error when trying to upload file:

2018-10-01 22:23:56.392344+0200 Kwikbuck[5534:514841] [BoringSSL] boringssl_session_errorlog(236) [C6.1:2][0x102097e90] [boringssl_session_write] SSL_ERROR_SYSCALL(5): operation failed externally to the library

Domain has ssl certificate and I use for upload path.

My best idea at the moment would be to use an iframe to put form in and host it on my API site. My ancient experience with iframes just reminds me can only be sized in pixels. Not sure if this has changed…

Ok, trying the iframe way. Not getting iframe to work on ios yet, but at least in browser view. Problem with this is file upload of server connect does not work with site links like this:

“message”: “Invalid Path!”,

Only works with sellers/img/

@George Is this set or can it be allowed somehow? Without this option I cannot see how one can have file uploads on a mobile app developed using Wappler and the frameworks…

Got iframe working wth page hosted with form on the site hosted on domain with the db as well as the folder images upload to using rlative link for upload. Not the ideal, but hopefully server connect and app connect mobile support will get better over time :slight_smile:

I think I will write an article about my first app build experience on medium for the others. That will cover everything from preparing the environment to roadblocks, niceties, pro’s con’s, basically the good, the bad and the ugly. Just gimme 2 - 3 weeks to finish the project. There will be a lot of writing on wappler coming towards ebd of the year. Just want to see the dust settle.


Hi Marcel,

Normally file upload from a regular form should work fine also in Cordova. Maybe it was some mixure of SSL certificates that you had? So the form post was not accepted

If your form just post to the external Server Connect extension handling to file upload it should be all fine.

That will be really awesome. There are a lot of requests for practical solutions and just getting started on projects like this.

Ok, will try again changing what I can. Big problem is that cloudways was the only shared hosting platform I could find that would open up the domain for external javascript requests. So I can't reallt test this on another domain since all my other hosting options are closed. Does anybody have suggestions and experience on cross domain javascript requests. Cloudways works fine for me, except the form post obviously...

why do you need this? You can upload from your app to any hosing you want ...

You just setup a second Wappler project as an API to you hosting ... and use its server actions

I tried this, but my hosting provider blocks these requests from external sources for security reasons. One was not willing to open it up. I requested from cloudways and they did. Then it worked…

isn’t your request just blocked by CORS


Thanks @George I read through the posts and it makes sense. So I moved db and API files to my original server, changed connection properties on API site and reconnected app to API site to include new links for server connect actions.

I now get a 500 internal server error.

It does work using hosted db in API project and local files though, but not as APP in browser app or packaged as ios app loaded on a phone

Well, I’ve got file uploads working now with Cordova :slight_smile: Works just like on the web. Not getting any errors anymore.

1 Like