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.


Todo el mundo puede leer el foro de soporte de DecSoft para aprender del mismo, sin embargo, sólo los clientes de DecSoft pueden abrir nuevos hilos. Compre una o más licencias de productos de DecSoft y obtendrá este y otros beneficios.

Este sitio utiliza "cookies" útiles para almacenar sus preferencias.

Bien. Ocultar esta nota. Obtener más información.