[File Transfer Plugin] Does File Transfer Plugin works for PWA generated app?
Forge component by OutSystems R&D
Published on 22 Dec 2020


I wanted to know if PWA generated app can use the File Transfer Plugin. I tried following the file transfer plugin sample app but nothing is downloaded, I also tried set up in the OnReady for the FilePath but I get error message "Cordova not defined".

Rank: #1215

Hi Wenchester,

How are you accessing your PWA? Most Cordova plugins will only work on mobile devices. 

Rank: #1025

Hi Jeroen,

I install it in my android phone through browser "Add to Home"

Rank: #297

Hi Wenchester 

Because File Transfer Plugin supports browser, So I think it will work on PWA.

Can you upload oml file? So we can take a look for more details.

Best Regards

Rank: #17

Hi Wenchester, 

You can inspect the codeof the FileTransfer Plugin by opening the module  in service studio. What you will see is that it uses a Cordova github project and that on every download/upload action it checks for the existence of the cordova plugin and cordova. 

As a PWA does not run in a cordova shell, but directly in the  browser, I believe the plugin cannot be used when installed as a PWA. You can test this out by installing the accompanying demo application as a PWA on your mobile device. You will notice an error message is shown "Cordova is not defined".



Rank: #1025

So if I want to distribute my apps as a PWA and want to have a download feature in my mobile apps, how to do so?