Trying to download files from HTTP only sites currently causes mixed content errors which makes downloading impossible without copying and pasting the download link into the browser address bar. Mixed content errors usually fail silently as the error only shows up in the browser's dev tools.
To mitigate this, I've added a listener where if a dataset resource link is clicked on and it is HTTP only, it will display a modal advising the user to copy and paste the URL into their browser address bar to download. It also provides a link to the original dataset page.
Description
Solves https://github.com/OpenDataScotland/the_od_bods/issues/99
Motivation and Context
Trying to download files from HTTP only sites currently causes mixed content errors which makes downloading impossible without copying and pasting the download link into the browser address bar. Mixed content errors usually fail silently as the error only shows up in the browser's dev tools.
To mitigate this, I've added a listener where if a dataset resource link is clicked on and it is HTTP only, it will display a modal advising the user to copy and paste the URL into their browser address bar to download. It also provides a link to the original dataset page.
How Has This Been Tested?
Tested trying to download a HTTP only resource e.g. Angus Council Area Fact Sheet. Modal appears as expected.
Tested trying to download a HTTPS resource. Still allows download as normal and modal does not appear.
Screenshots (if appropriate):
Types of changes
Checklist: