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

Make a query param to change content-disposition from attachment to inline #1956

Merged
merged 3 commits into from Dec 10, 2021

Conversation

whikloj
Copy link
Collaborator

@whikloj whikloj commented Nov 24, 2021

JIRA Ticket: https://fedora-repository.atlassian.net/browse/FCREPO-3791 & https://fedora-repository.atlassian.net/browse/FCREPO-1843

What does this Pull Request do?

Adds a query parameter inline, that if set to true will result in the Content-Disposition being set to inline. Otherwise it remains attachment

This is also changed for HEAD requests, mementos and external content.

How should this be tested?

Add a binary to a repository using main.
GET the binary

  • Through the HTML UI, see that pressing the "Download Content" button causes a save file dialog
  • Through curl see the Content-Disposition: attachment; size=79; creation-date="Wed, 24 Nov 2021 14:52:17 GMT"; modification-date="Wed, 24 Nov 2021 14:52:17 GMT" header

Pull in this PR
GET the binary

  • Through the HTML UI you cannot easily see this behaviour but if you go to a binary (which actually takes you to the description), remove /fcr:metadata and add ?inline=true you will immediately gets the content.
  • Through curl also add ?inline=true and see the Content-Disposition: inline; size=79; creation-date="Wed, 24 Nov 2021 14:52:17 GMT"; modification-date="Wed, 24 Nov 2021 14:52:17 GMT" header (might have to do a HEAD if you use an image as your binary)

Interested parties

Tag (@ mention) interested parties or, if unsure, @fcrepo/committers

@whikloj whikloj changed the title Change content-disposition from attachment to inline Make a query param to change content-disposition from attachment to inline Dec 6, 2021
@dbernstein dbernstein self-requested a review December 9, 2021 16:22
Copy link
Contributor

@dbernstein dbernstein left a comment

Choose a reason for hiding this comment

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

Code looks good, builds well, and manual tests work as advertised.

@dbernstein dbernstein merged commit 53d538b into fcrepo:main Dec 10, 2021
@whikloj whikloj deleted the FCREPO-3791 branch July 28, 2022 19:37
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.

None yet

2 participants