US-EPA-CAMD / easey-ui

Project Management repo for EPA Clean Air Markets Division (CAMD) Business Suite of applications
MIT License
0 stars 0 forks source link

Bulk Data File Download Issues - Firefox and Safari. (RT 73520) #6032

Open ergjustin opened 8 months ago

ergjustin commented 8 months ago

Two screenshots are attached that show errors that result in the number of expected downloads not equaling the actual downloads Unable to download bulk files from safari and Firefox browser.

Firefox-example.png Safari Example.png
ergjustin commented 8 months ago

Research details: X-Frame-Options is a header included in the response to the request to state if the domain requested will allow itself to be displayed within a frame. It has nothing to do with javascript or HTML, and cannot be changed by the originator of the request.

This website has set this header to disallow it to be displayed in an iframe. There is nothing that can be done in a client-side web browser to stop this behaviour.(link)

ergjustin commented 8 months ago

@maheese In CAMPD UI using iframe for downloading zip files (link). Inside the iframe we cannot set X-Frame-Options. I tried with anchor tag <a> with target = “_blank” I can be able to download in safari browser, but when I download new window tab will open and it will not close automatically. And I tried with iframe using open URL (https://getsamplefiles.com/download/zip/sample-1.zip) then I can download file.

I think we need to change the policy of download URL for downloading.

ergjustin commented 8 months ago

@shahbazkhan1999 PR: https://github.com/US-EPA-CAMD/easey-campd-ui/pull/626

ergjustin commented 7 months ago

Deployed in Dev and Staging

szintgraff commented 6 months ago

Tested staging in Firefox and Safari. The correct number of files seem to be downloading. Moved to Ready for deployment.