Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Interview Export Errors #90

Merged
merged 5 commits into from
Mar 4, 2024
Merged

Fix: Interview Export Errors #90

merged 5 commits into from
Mar 4, 2024

Conversation

buckhalt
Copy link
Member

@buckhalt buckhalt commented Feb 29, 2024

Exporting interview sessions was not working properly on Safari and Firefox. This was due to the way the useDownload hook was implemented and how it creates an "a" element to trigger the download.

On some browsers, there are increased security restrictions around programmatically initiated downloads. The way to work with this is to create a blob and use its url as the href for the "a" element. Other uses of useDownload in this project create the blob before calling the download method, and pass it the blob's url. ExportInterviewsDialog was not implemented in the same way.

Therefore, this fix implements using blob and its url in ExportInterviewsDialog which fixes the issue. Future refactoring could be done to move this functionality all within the useDownload hook.

adds fetch and blob so that the browser can explicitly fetch the file before download
need to use blob within exportinterviews like other exports
when stack is too big it exceeds file size for endpoint
Copy link

vercel bot commented Feb 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fresco ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 1, 2024 3:48pm

@buckhalt buckhalt marked this pull request as ready for review February 29, 2024 22:13
components/ErrorReportNotifier.tsx Outdated Show resolved Hide resolved
@jthrilly jthrilly merged commit 4bfe106 into main Mar 4, 2024
5 checks passed
@jthrilly jthrilly deleted the fix/file-download-errors branch March 28, 2024 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants