Using cordova plugin camera to upload image

#1

Hi guys,
I’m using cordova plugin camera to upload an image. Users can upload image in two ways:

  • The first way: Use camera :
    var options = {
    quality: 100,
    sourceType: Camera.PictureSourceType.CAMERA,
    };
    Camera.getPicture returned: file:///storage/emulated/0/Android/data/com.startapplabs.ion2FullApp/cache/1486612749856.jpg
    Okay, I uploaded success use fileTransfer
  • The second way: Load from Library
    var options = {
    quality: 100,
    sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
    };
    Camera.getPicture returned: file:///storage/emulated/0/Android/data/com.startapplabs.ion2FullApp/cache/.Pic.jpg?1486612718166
    main.js:36237 FileError {code: 1, message: “NOT_FOUND_ERR”}
    What is happening? I can upload with this format.
    Thanks so much !