I have a closed-source SaaS webapp that requires OAuth for my users to access some data. Much of the data available is binary, and would be much easier dealt with if users could download files, rather than doing everything in the browser.
I can write javascript and deploy it in the webapp, so I can trigger the OAuth authentication and add the required Authorization
token header to a data request.
It is not possible to send authorization in any other way (e.g., query parameter) besides an HTTP header, so I can't make simple HTML anchor tags with URLs to allow users to download data as files.
I believe I can use the Blob URLs to enable downloading of this data, and fall back to data URLs for older browsers.
Two questions:
Is there an easier way for me to allow my users to download data as files, but still inject an HTTP header?
Can I stream the data, so I don't need a 100MB data URL?