hi, if i upload image via this javascript function
App42.initialize("XXXXXXXXXXX", "XXXXXXXXXXXX");
var uploadService = new App42Upload();
uploadService.uploadFileForUser("avatar", authData.username.value, "/home/nessuno/myApp/www/img/avatar.png", "IMAGE", "image",
{
success: function(object)
{
alert("ok");
var uploadObj = JSON.parse(object);
console.log("name is " + uploadObj.app42.response.upload.files.file.name);
console.log("file type is" + uploadObj.app42.response.upload.files.file.type);
console.log(" url is" + uploadObj.app42.response.upload.files.file.url);
},
error: function(error) { alert(error); }
});
i received this error the parameter file cannot be null or empty
the image path its ok. and, if I put it absolute or relative path ("img/avatar.png") the function does not work.
i use ionic framework with angularjs. i lost one day with this problem and i dont know how to fix it