I have noticed that: If the Mozilla Firefox user clicks on download link (EX: this), the following "Open with/Save" dialog window will pop up:
I have download manager named rd
written in Python, So I need to:
Catch the download link from Firefox.
Send it to my download manager.
I want to achieve that by any method of the following:
html
but We should give the user the ability to add to/remove from
that file types send to my application.This is handled by Firefox's MIME type handling and can be configured by editing MimeTypes.rdf. I don't think there is a way to handle all but a certain type, rather it seems you have to explicitly enable your app for every MIME type you wish to handle.
Here's an example of setting the handler of .png
files to your rd program.
<RDF:Description RDF:about="urn:mimetype:image/png"
NC:fileExtensions="png"
NC:description="PNG Image"
NC:value="image/png"
NC:editable="true">
<NC:handlerProp RDF:resource="urn:mimetype:handler:image/png"/>
</RDF:Description>
<RDF:Description RDF:about="urn:mimetype:handler:image/png"
NC:alwaysAsk="false"
NC:saveToDisk="false"
NC:useSystemDefault="false"
NC:handleInternal="false">
<NC:externalApplication RDF:resource="urn:mimetype:externalApplication:image/png"/>
</RDF:Description>
<RDF:Description RDF:about="urn:mimetype:externalApplication:image/png"
NC:path="[PATH TO rd]"
NC:prettyName="rd" />
As for enabling the user to change the default handler to something else, this is already enabled in Firefox's preferences (Preferences->Applications).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With