2

Every time I download an HDR file, Firefox prompts me asking what to do. I want to download the image 100% of the time, but I can't get Firefox to understand this. I am required to select "Save File" and then click "Okay".

after reading this page about changing download actions I thought I might be able to specify "save file" as the action for .hdr files. But it doesn't appear in the list.

After a bit more digging, I found this answer to a more general version of my question (not specific to HDR files). And I also studied this page as a reference. But even after I modify mimetypes.rdf the behavior of Firefox doesn't change.

Here's what I added:

<RDF:Seq RDF:about="urn:mimetypes:root">

<RDF:li RDF:resource="urn:mimetype:image/hdr"/>

</RDF:Seq>

  <RDF:Description RDF:about="urn:mimetype:image/hdr"
                   NC:fileExtensions="hdr"
                   NC:description="HDR Image"
                   NC:value="image/hdr"
                   NC:editable="true">
    <NC:handlerProp RDF:resource="urn:mimetype:handler:image/hdr"/>
  </RDF:Description>

  <RDF:Description RDF:about="urn:mimetype:handler:image/hdr"
                   NC:alwaysAsk="false"
                   NC:saveToDisk="true"
                   NC:useSystemDefault="false"
                   NC:handleInternal="false">
    <NC:externalApplication RDF:resource="urn:mimetype:externalApplication:image/hdr"/>
  </RDF:Description>

What could I be doing wrong? Thanks.

1

Firefox does not use mimetypes.rdf any more, using instead the file handlers.json.

However, modifying this file will not help, because of the way that the website hdrihaven.com encodes its answers.

The website tells the browser the following in the header of the download file:

Content-Type: application/octet-stream

This just defines the download file as a stream of bytes, not as a HDR type. This is why Firefox does not offer you the option to remember the action, since the type is not defined. Trying to force it in handlers.json will have a much larger effect on future downloads than just for HDR files, as this Content-Type is much used in many cases.

You might try to contact the website Support and ask that they change the header to:

Content-Type: application/hdr

This will allow you to define a default download action for HDR files.

1
  • I appreciate the detailed explanation! – Mentalist Sep 17 '20 at 19:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.