As part of the service we run, people can upload files of various kinds (PDFs, spreadsheets, etc). What’s the best way to support downloading/viewing these files using Capacitor? For our website, it’s just click a link that downloads the file and the browser handles it, whether viewing or saving. But that doesn’t work with Capacitor. Do we use a download plugin, and if so, which one? We need to authenticate the user before downloading the file (via cookies).
Replying to my own post here, for future reference. What I was really looking for was the
@capacitor-mobi/cordova-plugin-preview-any-file plugin. I was able to get that to work by also including the
@awesome-cordova-plugins/preview-any-file plugin. On Android, it also required some tweaking of the build parameters. But overall it seems to work great.