File transfer


I am trying to build file transfer into the app, but every time i try to upload a file i get greeted with

   body: null
   code: 3
   exception: " Trust anchor for certification path not found."
   http_status: null
   source: "file:///storage/emulated/0/Download/order69639758.pdf"
   target: "https://URL/link/to/api/attachments"

now for this testing i use the development branch and i link the URL to my pc. it works fine for all post and gets and it also works fine when updating for live.

The attachments on the other hand don’t work. There is no certificate on the android device and site.
would there by any chance be a solution for rooted android devices during development or do i have to create a certificate for this matter?
the android phone where i have been testing on is android 7.1.2 and i read that more people have trouble with android 7.


const fileTransferObject: FileTransferObject = this.fileTransfer.create();
        let trustAllHosts = true;

        let options: FileUploadOptions = {
            fileKey: 'file',
            fileName: '*.*',
            mimeType: 'multipart/form-data',
            headers: {'Content-Type': 'application/x-www-form-urlencoded'},
            params: {'user_id':, 'token':, 'project_id': projects['project_id']}
        fileTransferObject.upload(this.attach, 'https://URL/link/to/api/attachments', options, trustAllHosts)
        .then((data) => {
        }, (err) => {

the URL is my ip4v for xampp

Did you manage to solve this ?

yeah. for me the fix was using an actually site instead of a xampp/wampp based host. since xampp/wampp don’t have certificates and the actual live site does.

Yeah I finally managed to do it even on my local MAMP server ! But it’s been tough haha

solution for android?