6

I am working on a phonegap app that makes use of http://tabulator.info/ to render data tables. One of the feature of tabulator is that it allows exporting the contents of the table for download as an excel file (xlsx). The feature works great on standalone webpage/app and downloads an xls file on chrome/safari browsers on Android/iPhone respectively.

The Problem : the download feature does not work when the same webapp is packages as a phonegap cordova app. It seems like Phonegap/Cordova does not allow opening of data: urls for PDFs and XLSX. The app config.xml has been updated with the required whitelist plugin and the required entries for allowing data: urls.

Also, the html file contains the following content security policy on the top:

<meta http-equiv="Content-Security-Policy" content="
    default-src * data:; 
    style-src * 'unsafe-inline'; 
    script-src * 'unsafe-inline'; 
    media-src * data:; img-src * data:; 
" /> 

I have tried creating a small dummy app trying to open a sample data: link via the anchor tag and it simply does not do anything. No exceptions logged in debugger/console either.

Has anyone come across this scenario? Anyone figured out a solution yet?

Any help is greatly appreciated.

Thank You.

oxfordian
  • 141
  • 1
  • 9

0 Answers0