atom
atom copied to clipboard
Problem: AtoM sets incorrect content-type for pdfs
Current Behavior
Steps to reproduce the behavior
- Attempt to download a .pdf file
- Notice that the content-type for the pdf file is specified as
text/html
instead ofapplication/pdf
in the request in the network tab. - 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