FileTransfer download and POST parameters

Hello,

I have a question about the FileTransfer plugin and the possibility of specifying POST paraneters with the download method. Is it possible? How would it be? According to the docs, it allows just simple headers…

I need it because the URL on the server requires a file name and several other params, and then it retrieves the file with PHP’s readfile.

Thanks in advance.

2 Likes

Or is it possible to download a file from the server with HttpClient? What I have is not a URL with a file name, but a PHP that takes the file from the server and returns it with PHP readfile. Thank you again.

i am facing same problem, i need to post some parameter to download a file

Any one solve this problem? I am also facing same issue.
Please guide me if someone solve this.
Thank you.

Hi @yogesh1988,

I solved the issue without using FileTransfer plugin. I took the approach of the functionality that XMLHttpRequest and Angular’s HttpClient offer. It allows to download and upload text and binary files, forms, and so on. You can take a look at this thread: https://forum.ionicframework.com/t/how-to-download-stuff-now-that-transfer-file-is-deprecated/127451, it’s very illustrating.