Skip to content

Browser determined download for files tab - #849

Merged
cjcolvar merged 2 commits into
mainfrom
browser-determined-download
Jul 21, 2025
Merged

Browser determined download for files tab#849
cjcolvar merged 2 commits into
mainfrom
browser-determined-download

Conversation

@cjcolvar

@cjcolvar cjcolvar commented Jul 17, 2025

Copy link
Copy Markdown
Member

Part of avalonmediasystem/avalon#6399
Related to #840

This PR removes the special handling of links from the SupplementalFiles component allowing the server serving those urls to supply appropriate content disposition headers that would allow the file to be rendered inline in the browser instead of forcing download.

It appears that the download attribute on anchor tags makes Chrome and Firefox download ignoring the inline content disposition header if present. See final note in MDN docs.

I included a build in this PR so I could test it out in avalon. If it is better for that to be taken out and happen in another PR I'm happy to do so.

@cjcolvar
cjcolvar force-pushed the browser-determined-download branch from c082489 to fd6e8ef Compare July 17, 2025 17:44
@cjcolvar
cjcolvar marked this pull request as ready for review July 17, 2025 17:59

@Dananji Dananji left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good 👍

As for the build files, I like not including build files in PRs because it makes

  • the PR cleaner
  • the merging process easier when there are multiple PRs, which shouldn't be an issue with this

And I'm okay with merging this as it it.

If it helps, what I do when I need to test things in Avalon I run yarn build and then yarn pack to create a .tgz file, which I then move to avalon workspace and install with yarn using yarn add ./samvera-ramp-v4.0.0.tgz

@cjcolvar

Copy link
Copy Markdown
Member Author

Thanks, I forgot about the yarn pack process. That's definitely cleaner.

@cjcolvar
cjcolvar merged commit 3873695 into main Jul 21, 2025
2 checks passed
@cjcolvar
cjcolvar deleted the browser-determined-download branch July 21, 2025 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants