atom icon indicating copy to clipboard operation
atom copied to clipboard

Problem: AtoM sets incorrect content-type for pdfs

Open anvit opened this issue 6 months ago • 0 comments

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 avatar Sep 03 '24 22:09 anvit