Upload image file to the app's server


Mario Steinbacher
Hello David,

I'm currently working on a feature to caputure an image and send it to the server with other input data.
But it seems that the function app.cordova.file.getBlobFromFileUri doesn't exist anymore.

Do you have any other solution for this usecase?

best regards
Mario

DecSoft

Hello Mario,

The function that you refer is part of the Cordova File app plugin (exactly is: "getFileBlobFromFileUrl", I am not sure there was renamed from: "getFileBlobFromFileUri")... so be sure that the Cordova File plugin is checked in the app's options -> Apache Cordova -> Plugins.

On the other hand, may you can consider to use a File input (set the "Accept" property to "image/*"). This works in all platforms and can be a very good idea in order to take a photo and upload it to the app's server. You can take a look at the "Http" sample app.


Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.

This website uses some useful cookies to store your preferences.

I agree. Hide this note. Give me more information.