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

Problem: AtoM sets incorrect content-type for pdfs #1868

Open
anvit opened this issue Sep 3, 2024 · 0 comments
Open

Problem: AtoM sets incorrect content-type for pdfs #1868

anvit opened this issue Sep 3, 2024 · 0 comments
Labels
Type: bug A flaw in the code that causes the software to produce an incorrect or unexpected result.

Comments

@anvit
Copy link
Contributor

anvit commented Sep 3, 2024

Current Behavior

Steps to reproduce the behavior

  1. Attempt to download a .pdf file
  2. Notice that the content-type for the pdf file is specified as text/html instead of application/pdf in the request in the network tab.
  3. If using safari, notice that the file is actually downloaded as a .pdf.html instead of just a .pdf

Expected Behavior

The content-type for pdfs should be set to application/pdf.

Possible Solution

This might be originating in the informationobjectsDownloaDigitalObjectsAction: https://github.com/artefactual/atom/blob/qa/2.x/plugins/arRestApiPlugin/modules/api/actions/informationobjectsDownloadDigitalObjectAction.class.php#L72-L87

@anvit anvit added the Type: bug A flaw in the code that causes the software to produce an incorrect or unexpected result. label Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: bug A flaw in the code that causes the software to produce an incorrect or unexpected result.
Projects
None yet
Development

No branches or pull requests

1 participant